How to use @cloudbase/database - 2 common examples

To help you get started, we’ve selected a few @cloudbase/database examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TencentCloudBase / tcb-admin-node / index.js View on Github external
Tcb.prototype.database = function(dbConfig = {}) {
  Db.reqClass = Request
  if (Object.prototype.toString.call(dbConfig).slice(8, -1) !== 'Object') {
    throw Error('dbConfig must be an object')
  }

  if (dbConfig && dbConfig.env) {
    // env变量名转换
    dbConfig.envName = dbConfig.env
    delete dbConfig.env
  }
  this.config = Object.assign(this.config, dbConfig)
  return new Db({ ...this })
}
github TencentCloudBase / tcb-admin-node / index.js View on Github external
const Db = require('@cloudbase/database').Db
const storage = require('./src/storage')
const functions = require('./src/functions')
const auth = require('./src/auth')
const wx = require('./src/wx')
const Request = require('./src/utils/dbRequest')
const logger = require('./src/log')

function Tcb(config) {
  this.config = config ? config : this.config
}

Tcb.prototype.init = function({
  secretId,
  secretKey,
  sessionToken,
  env,

@cloudbase/database

database for (node.)js sdk

ISC
Latest version published 1 year ago

Package Health Score

43 / 100
Full package analysis

Popular @cloudbase/database functions

Similar packages