manatee-cloud-sdk
v0.0.2
Published
海牛云函数SDK
Downloads
1
Readme
manatee-cloud-sdk
开始
import { init } from 'manatee-cloud-sdk'
const app = init({
datasource: 'http://xxx',
secretKey: 'xxx'
})
const db = app.database()
const res = await db.collection().add({ name: 'test' })db
数据库函数
add
// 单个添加
const { id } = await db.collection().add({ name: 'test' })
// 批量添加
const { ids } = await db.collection().add([{ name: 'test1' }, { name: 'test2' }])