New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

capacitor-sqlite-android

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capacitor-sqlite-android

sqlite

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

capacitor-sqlite-android

sqlite

Install

npm install capacitor-sqlite-android
npx cap sync

API

  • echo(...)
  • loadDatabase(...)
  • queryForObject(...)
  • queryForList(...)
  • insertEntity(...)
  • updateEntity(...)
  • delEntity(...)
  • Interfaces

echo(...)

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

测试方法

ParamTypeDescription
options{ value: string; }echo params

Returns: Promise<{ value: string; }>

loadDatabase(...)

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

加载数据库

ParamTypeDescription
options{ dbPath?: string; dbName: string; }dbPath: 数据库文件位置 dbName: 数据文件名

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

queryForObject(...)

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

查询单个对象

ParamTypeDescription
optionsSQLiteQueryOptions查询参数 {@link SQLiteQueryOptions}

Returns: Promise<{ data: any; }>

queryForList(...)

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

查询列表

ParamTypeDescription
optionsSQLiteQueryOptions查询参数 {@link SQLiteQueryOptions}

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

insertEntity(...)

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

保存实体

ParamTypeDescription
optionsSQLiteEnitytOptions实体参数 {@link SQLiteEnitytOptions}

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

updateEntity(...)

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

更新实体

ParamTypeDescription
optionsSQLiteEntityUpdateOptions更新实体参数 {@link SQLiteEntityUpdateOptions}

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

delEntity(...)

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

删除实体

ParamTypeDescription
optionsSQLiteEntityUpdateOptions更新实体参数 {@link SQLiteEntityUpdateOptions}

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

Interfaces

SQLiteQueryOptions

数据库查询对象

PropTypeDescription
tblNamestring操作表名
selectionstring查询条件 eg: a=? and b like '%?'
selectionArgsstring[]查询的参数 替换 selection 中的 ?
returnColumnsstring[]返回的列名 为空则返回所有
groupBystringgroupby 语句 eg: name
havingstringhaving 语句 eg: sum(area) > 20
orderBystringorder by 语句 eg: time desc
limitnumberlimit 数量 eg: 10

SQLiteEnitytOptions

数据库实体保存对象

PropTypeDescription
tblNamestring操作的表名
columnsSQLiteEntityColumn[]保存的数据列 {@link SQLiteEntityColumn}

SQLiteEntityColumn

数据库实体数据列

PropTypeDescription
namestring字段名称
valuestring | number | boolean字段值
nullableboolean是否允许为null 默认 false

SQLiteEntityUpdateOptions

实体更新对象

PropTypeDescription
tblNamestring操作的表名
columnsSQLiteEntityColumn[]保存的数据列 {@link SQLiteEntityColumn}
whereClausestringwhere 条件 eg: id=?
whereClauseArgsstring[]where 条件参数 ? 的值

Keywords

capacitor

FAQs

Package last updated on 31 Oct 2022

Did you know?

Socket

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.

Install

Related posts