Closed roushanj closed 7 years ago
ES6:
import * as RxDB from 'rxdb'; RxDB.create('heroesDB', 'websql', 'myLongAndStupidPassword', true) // create database .then(db => db.collection('mycollection', mySchema)) // create collection .then(collection => collection.insert({name: 'Bob'})) // insert document
ES5:
var RxDB = require('rxdb'); RxDB.create('heroesDB', 'websql', 'myLongAndStupidPassword', true) // create database .then(function(db) {return db.collection('mycollection', mySchema);}) // create collection .then(function(collection) {collection.insert({name: 'Bob'});}) // insert document
where i suppose to put this code ,
@roushanj please check one of the examples.
ES6:
import * as RxDB from 'rxdb'; RxDB.create('heroesDB', 'websql', 'myLongAndStupidPassword', true) // create database .then(db => db.collection('mycollection', mySchema)) // create collection .then(collection => collection.insert({name: 'Bob'})) // insert document
ES5:
var RxDB = require('rxdb'); RxDB.create('heroesDB', 'websql', 'myLongAndStupidPassword', true) // create database .then(function(db) {return db.collection('mycollection', mySchema);}) // create collection .then(function(collection) {collection.insert({name: 'Bob'});}) // insert document
where i suppose to put this code ,