npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

android-database-sqlite

v8.0.2

Published

Simple Capacitor wrapper around android.database.sqlite

Readme

android-database-sqlite

Simple Capacitor wrapper around android.database.sqlite

Maintainers

| Maintainer | GitHub | | ---------- | ------------------------------------------------------------------- | | Sergio | sergio-ponce-dominguez |

Supported Platform

  • Android

Install

npm install android-database-sqlite
npx cap sync

API

echo(...)

echo(options: { value: string; }) => Promise<{ value: string; }>

Return the same value passed in. Useful for basic connectivity / wiring tests.

| Param | Type | | ------------- | ------------------------------- | | options | { value: string; } |

Returns: Promise<{ value: string; }>


openOrCreateDatabase(...)

openOrCreateDatabase(options: { name?: string; }) => Promise<{ name: string; }>

Open an existing database by name or create it if it does not exist. Behavior mirrors Android's SQLiteDatabase.openOrCreateDatabase: it ensures a database with the given name is available for use.

| Param | Type | | ------------- | ------------------------------- | | options | { name?: string; } |

Returns: Promise<{ name: string; }>


isOpen(...)

isOpen(options: { name?: string; }) => Promise<{ value: boolean; }>

Check whether the named database is currently open.

| Param | Type | | ------------- | ------------------------------- | | options | { name?: string; } |

Returns: Promise<{ value: boolean; }>


close(...)

close(options: { name?: string; }) => Promise<void>

Close the named database. After calling this, the database should no longer be used until reopened.

| Param | Type | | ------------- | ------------------------------- | | options | { name?: string; } |


execSQL(...)

execSQL(options: { name?: string; sql: string; bindArgs?: any[]; getChanges?: boolean; }) => Promise<{ changes?: number; lastId?: number; }>

Execute a single SQL statement that does not return results (for example DDL or INSERT/UPDATE/DELETE without returning rows).

| Param | Type | | ------------- | ------------------------------------------------------------------------------------ | | options | { name?: string; sql: string; bindArgs?: any[]; getChanges?: boolean; } |

Returns: Promise<{ changes?: number; lastId?: number; }>


rawQuery(...)

rawQuery(options: { name?: string; sql: string; selectionArgs?: any[]; }) => Promise<{ rows: any[]; }>

Run a SELECT query and return the resulting rows.

This mirrors SQLiteDatabase.rawQuery: the SQL may contain '?' placeholders that will be replaced by selectionArgs in order.

| Param | Type | | ------------- | ------------------------------------------------------------------- | | options | { name?: string; sql: string; selectionArgs?: any[]; } |

Returns: Promise<{ rows: any[]; }>


insert(...)

insert(options: { name?: string; table: string; values: Record<string, any>; }) => Promise<{ id: number; }>

Insert a row into a table.

Mirrors SQLiteDatabase.insert: values is a map of column names to values.

| Param | Type | | ------------- | ------------------------------------------------------------------------------------------------------- | | options | { name?: string; table: string; values: Record<string, any>; } |

Returns: Promise<{ id: number; }>


getLastInsertRowId(...)

getLastInsertRowId(options: { name?: string; }) => Promise<{ lastId: number; }>

Return the "rowId" of the last row to be inserted on the current connection.

Mirrors SQLiteDatabase.getLastInsertRowId.

| Param | Type | | ------------- | ------------------------------- | | options | { name?: string; } |

Returns: Promise<{ lastId: number; }>


getLastChangedRowCount(...)

getLastChangedRowCount(options: { name?: string; }) => Promise<{ changes: number; }>

Return the number of database rows that were inserted, updated, or deleted by the most recent SQL statement within the current transaction.

Mirrors SQLiteDatabase.getLastChangedRowCount.

| Param | Type | | ------------- | ------------------------------- | | options | { name?: string; } |

Returns: Promise<{ changes: number; }>


update(...)

update(options: { name?: string; table: string; values: Record<string, any>; whereClause?: string; whereArgs?: any[]; }) => Promise<{ rowsAffected: number; }>

Update rows in a table.

Mirrors SQLiteDatabase.update: updates rows that match the whereClause (which may contain '?' placeholders replaced by whereArgs).

| Param | Type | | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | options | { name?: string; table: string; values: Record<string, any>; whereClause?: string; whereArgs?: any[]; } |

Returns: Promise<{ rowsAffected: number; }>


delete(...)

delete(options: { name?: string; table: string; whereClause?: string; whereArgs?: any[]; }) => Promise<{ rowsAffected: number; }>

Delete rows from a table.

Mirrors SQLiteDatabase.delete: deletes rows that match the whereClause (which may contain '?' placeholders replaced by whereArgs).

| Param | Type | | ------------- | --------------------------------------------------------------------------------------- | | options | { name?: string; table: string; whereClause?: string; whereArgs?: any[]; } |

Returns: Promise<{ rowsAffected: number; }>


beginTransaction(...)

beginTransaction(options: { name?: string; }) => Promise<void>

Begin a transaction on the named database. Subsequent operations will be part of the transaction until endTransaction is called.

Note: transaction semantics (exclusive, deferred, etc.) follow the plugin's implementation and are intended to match Android's default behavior.

| Param | Type | | ------------- | ------------------------------- | | options | { name?: string; } |


setTransactionSuccessful(...)

setTransactionSuccessful(options: { name?: string; }) => Promise<void>

Mark the current transaction as successful. When endTransaction is called, if setTransactionSuccessful was called, the transaction will be committed; otherwise it will be rolled back.

| Param | Type | | ------------- | ------------------------------- | | options | { name?: string; } |


endTransaction(...)

endTransaction(options: { name?: string; }) => Promise<void>

End a transaction. Commits if setTransactionSuccessful was called on the current transaction, otherwise rolls back.

| Param | Type | | ------------- | ------------------------------- | | options | { name?: string; } |


getVersion(...)

getVersion(options: { name?: string; }) => Promise<{ version: number; }>

Get the user_version PRAGMA for the database. This is commonly used to store the schema version.

| Param | Type | | ------------- | ------------------------------- | | options | { name?: string; } |

Returns: Promise<{ version: number; }>


setVersion(...)

setVersion(options: { name?: string; version: number; }) => Promise<void>

Set the user_version PRAGMA for the database. Used to record schema version.

| Param | Type | | ------------- | ------------------------------------------------ | | options | { name?: string; version: number; } |


Type Aliases

Record

Construct a type with a set of properties K of type T

{ [P in K]: T; }