14 lines
283 B
JavaScript
14 lines
283 B
JavaScript
|
import db from 'apigo.cc/gojs/db'
|
||
|
|
||
|
function main(testUserName){
|
||
|
db.setDefault('sqlite://test.db')
|
||
|
db.make(`
|
||
|
User
|
||
|
id i AI
|
||
|
name t
|
||
|
`)
|
||
|
db.insert('User', {name: testUserName})
|
||
|
let user = db.query1('SELECT * FROM User').result
|
||
|
return user
|
||
|
}
|