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 🙏

© 2024 – Pkg Stats / Ryan Hefner

capacitor-sqlite-android

v0.2.0

Published

sqlite

Downloads

15

Readme

capacitor-sqlite-android

sqlite

Install

npm install capacitor-sqlite-android
npx cap sync

API

echo(...)

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

测试方法

| Param | Type | Description | | ------------- | ------------------------------- | ----------- | | options | { value: string; } | echo params |

Returns: Promise<{ value: string; }>


loadDatabase(...)

loadDatabase(options: { dbPath?: string; dbName: string; }) => Promise<{ data: string | boolean; }>

加载数据库

| Param | Type | Description | | ------------- | ------------------------------------------------- | ----------------------------- | | options | { dbPath?: string; dbName: string; } | dbPath: 数据库文件位置 dbName: 数据文件名 |

Returns: Promise<{ data: string | boolean; }>


queryForObject(...)

queryForObject(options: SQLiteQueryOptions) => Promise<{ data: any; }>

查询单个对象

| Param | Type | Description | | ------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | | options | SQLiteQueryOptions | 查询参数 {@link SQLiteQueryOptions} |

Returns: Promise<{ data: any; }>


queryForList(...)

queryForList(options: SQLiteQueryOptions) => Promise<{ data: any[]; }>

查询列表

| Param | Type | Description | | ------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | | options | SQLiteQueryOptions | 查询参数 {@link SQLiteQueryOptions} |

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


insertEntity(...)

insertEntity(options: SQLiteEnitytOptions) => Promise<{ data: string | boolean; }>

保存实体

| Param | Type | Description | | ------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | options | SQLiteEnitytOptions | 实体参数 {@link SQLiteEnitytOptions} |

Returns: Promise<{ data: string | boolean; }>


updateEntity(...)

updateEntity(options: SQLiteEntityUpdateOptions) => Promise<{ data: string | boolean; }>

更新实体

| Param | Type | Description | | ------------- | ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | | options | SQLiteEntityUpdateOptions | 更新实体参数 {@link SQLiteEntityUpdateOptions} |

Returns: Promise<{ data: string | boolean; }>


delEntity(...)

delEntity(options: SQLiteEntityUpdateOptions) => Promise<{ data: string | boolean; }>

删除实体

| Param | Type | Description | | ------------- | ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | | options | SQLiteEntityUpdateOptions | 更新实体参数 {@link SQLiteEntityUpdateOptions} |

Returns: Promise<{ data: string | boolean; }>


Interfaces

SQLiteQueryOptions

数据库查询对象

| Prop | Type | Description | | ------------------- | --------------------- | ------------------------------- | | tblName | string | 操作表名 | | selection | string | 查询条件 eg: a=? and b like '%?' | | selectionArgs | string[] | 查询的参数 替换 selection 中的 ? | | returnColumns | string[] | 返回的列名 为空则返回所有 | | groupBy | string | groupby 语句 eg: name | | having | string | having 语句 eg: sum(area) > 20 | | orderBy | string | order by 语句 eg: time desc | | limit | number | limit 数量 eg: 10 |

SQLiteEnitytOptions

数据库实体保存对象

| Prop | Type | Description | | ------------- | --------------------------------- | ------------------------------------------------------------------- | | tblName | string | 操作的表名 | | columns | SQLiteEntityColumn[] | 保存的数据列 {@link SQLiteEntityColumn} |

SQLiteEntityColumn

数据库实体数据列

| Prop | Type | Description | | -------------- | ---------------------------------------- | ------------------ | | name | string | 字段名称 | | value | string | number | boolean | 字段值 | | nullable | boolean | 是否允许为null 默认 false |

SQLiteEntityUpdateOptions

实体更新对象

| Prop | Type | Description | | --------------------- | --------------------------------- | ------------------------------------------------------------------- | | tblName | string | 操作的表名 | | columns | SQLiteEntityColumn[] | 保存的数据列 {@link SQLiteEntityColumn} | | whereClause | string | where 条件 eg: id=? | | whereClauseArgs | string[] | where 条件参数 ? 的值 |