Registry / database / nicole-sqlite

nicole-sqlite

JSON →
library1.0.8jsnpmunverified

A minimal wrapper around SQLite for NativeScript applications. Version 1.0.8 provides a simplified API for executing SQL statements and managing databases on iOS and Android. It wraps the NativeScript SQLite plugin with a promise-based interface. Key differentiator: lightweight, no external dependencies beyond NativeScript runtime. Release cadence is irregular with low activity; last update 2021.

npm install nicole-sqlite
INSTALL
IMPORT
SIG · NICOLE-SQLITE
N
nicole-sqlite
databasejavascriptv1.0.8
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

nicole-sqlite
import Sqlite from 'nicole-sqlite'
const Sqlite = require('nicole-sqlite')
Default export only. ESM import works with NativeScript; require may fail in some bundlers.
init
Sqlite.init(databaseName)
init(databaseName)
init is a static method on the default export, not a named export.
execute
Sqlite.execute(sql, params)
Sqlite.exec(sql, params)
Method is 'execute', not 'exec'.

Initializes a SQLite database and runs a simple query to demonstrate the promise-based API.

import Sqlite from 'nicole-sqlite'; async function main() { await Sqlite.init('myDatabase.db'); const result = await Sqlite.execute("SELECT 'Hello World' as message", []); console.log(result); } main();
Debug
Known issues
gotchaDatabase path is not configurable; defaults to app storage.
fix
Use nativescript-sqlite directly if custom path needed.
affects: <=1.0.8
gotchaOnly one database instance supported per app; calling init again throws error.
fix
Check if database exists before calling init.
affects: all
deprecatedNo TypeScript types bundled; type definitions are missing.
fix
Create custom .d.ts or use @types/nicole-sqlite if available.
affects: all
Errors
Common errors & fixes
Cannot find module 'nativescript-sqlite'
Peer dependency not installed.
fix
npm install nativescript-sqlite
TypeError: Sqlite.init is not a function
Wrong import style (require instead of import).
fix
Use import Sqlite from 'nicole-sqlite'
Upgrade
Version history
1.0.8latest on npm
Audit
Dependencies
nativescript-sqliterequiredcore SQLite functionality
Agent activity
5 hits · last 30 days
node
4
Resources
nicole-sqlite — npm install nicole-sqlite · libregistry