
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@haxtra/kvstore-sqlite
Advanced tools
Basic key-value store for SQLite databases.
npm install @haxtra/kvstore-sqlite
super-sqlite3
or better-sqlite3
instance as the database driverCreate instance
const KVStore = require('@haxtra/kvstore-sqlite')
const kv = new KVStore(superSqlite3Instance, {
table: 'kvstore' // table to use for the store, default "kvstore"
})
// when running for the first time, create the table
kv.createTable()
Note: All methods are synchronous.
Set/update value
kv.set(keyName, jsonableData)
Retrieve value from the store, falling back to optional default
kv.get(keyName, defaultValue?)
Remove key from the store
kv.delete(keyName)
Check if key exists, returns timestamp of the last update, or false if key is not set
kv.has(keyName)
Get count of stored keys
kv.count()
Get array of stored keys
kv.keys(page?, perPage?)
Get full store data, as an array of objects
kv.data(page?, perPage?)
Remove all data from the store
kv.purge()
Create store table with preconfigured name, defaults to kvstore
. Returns true
on success, false
if table exists, throws on invalid table name.
kv.createTable()
Get schema definition as a SQL string, with respect to current config.
kv.getSchema()
Get absolute path to schema.sql
file:
require.resolve('@haxtra/kvstore-sqlite/schema.sql')
MIT
FAQs
Basic key-value store for SQLite databases
We found that @haxtra/kvstore-sqlite demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.