-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
Hello,
I tried to use the expo-sqlite-orm but any operation (createTable, find, findBy..) returned
{"_h": 0, "_i": 0, "_j": null, "_k": null}
can you please help?
The code
const param = new Parameter(props); param.save(); let paramInDb = Parameter.findBy({ id_eq: 1 }); console.log("paramInDb 1"); console.log(paramInDb); console.log("paramInDb 2"); console.log(Parameter.find(1)); console.log(Parameter.query());
The Parameter class
import * as SQLite from "expo-sqlite" import { BaseModel, types } from 'expo-sqlite-orm' export default class Parameter extends BaseModel { constructor(obj) { super(obj) } static get database() { return async () => SQLite.openDatabase('videothequesss.db') } static get tableName() { return 'parameters' } static get columnMapping() { return { id: { type: types.INTEGER, primary_key: true }, nameParam:{ type: types.TEXT }, valueParam: { type: types.TEXT } } }}
diaraujo13
Metadata
Metadata
Assignees
Labels
No labels