
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
capacitor-sqlite-android
Advanced tools
sqlite
npm install capacitor-sqlite-android
npx cap sync
echo(...)loadDatabase(...)queryForObject(...)queryForList(...)insertEntity(...)updateEntity(...)delEntity(...)echo(options: { value: string; }) => Promise<{ value: string; }>
测试方法
| Param | Type | Description |
|---|---|---|
options | { value: string; } | echo params |
Returns: Promise<{ value: string; }>
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(options: SQLiteQueryOptions) => Promise<{ data: any; }>
查询单个对象
| Param | Type | Description |
|---|---|---|
options | SQLiteQueryOptions | 查询参数 {@link SQLiteQueryOptions} |
Returns: Promise<{ data: any; }>
queryForList(options: SQLiteQueryOptions) => Promise<{ data: any[]; }>
查询列表
| Param | Type | Description |
|---|---|---|
options | SQLiteQueryOptions | 查询参数 {@link SQLiteQueryOptions} |
Returns: Promise<{ data: any[]; }>
insertEntity(options: SQLiteEnitytOptions) => Promise<{ data: string | boolean; }>
保存实体
| Param | Type | Description |
|---|---|---|
options | SQLiteEnitytOptions | 实体参数 {@link SQLiteEnitytOptions} |
Returns: Promise<{ data: string | boolean; }>
updateEntity(options: SQLiteEntityUpdateOptions) => Promise<{ data: string | boolean; }>
更新实体
| Param | Type | Description |
|---|---|---|
options | SQLiteEntityUpdateOptions | 更新实体参数 {@link SQLiteEntityUpdateOptions} |
Returns: Promise<{ data: string | boolean; }>
delEntity(options: SQLiteEntityUpdateOptions) => Promise<{ data: string | boolean; }>
删除实体
| Param | Type | Description |
|---|---|---|
options | SQLiteEntityUpdateOptions | 更新实体参数 {@link SQLiteEntityUpdateOptions} |
Returns: Promise<{ data: string | boolean; }>
数据库查询对象
| 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 |
数据库实体保存对象
| Prop | Type | Description |
|---|---|---|
tblName | string | 操作的表名 |
columns | SQLiteEntityColumn[] | 保存的数据列 {@link SQLiteEntityColumn} |
数据库实体数据列
| Prop | Type | Description |
|---|---|---|
name | string | 字段名称 |
value | string | number | boolean | 字段值 |
nullable | boolean | 是否允许为null 默认 false |
实体更新对象
| Prop | Type | Description |
|---|---|---|
tblName | string | 操作的表名 |
columns | SQLiteEntityColumn[] | 保存的数据列 {@link SQLiteEntityColumn} |
whereClause | string | where 条件 eg: id=? |
whereClauseArgs | string[] | where 条件参数 ? 的值 |
FAQs
sqlite
We found that capacitor-sqlite-android 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.