You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 10, 2023. It is now read-only.
/*** Running this the first time will create the database and insert a record, * but there will be no data in the pk index table** Running this the second time gives an error when calling connect()** If you change it to persistentIndex(false), it works fine.*/varsb=lf.schema.create('test_db',1);sb.createTable('Asset').addColumn('id',lf.Type.NUMBER).addColumn('asset',lf.Type.STRING).addPrimaryKey(['id']).persistentIndex(true);console.log('schema builder created');// Schema is defined, now connect to the database instance.sb.connect().then(asyncfunction(testDb){console.log('connect successful');letlocalTable=testDb.getSchema().table('Asset');awaittestDb.insertOrReplace().into(localTable).values([localTable.createRow({id: Date.now(),asset: 'test'})]).exec();console.log('insert successful');});