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
I am facing an issue where I want to run between query between two range timestamp values.But in SQLite DB number value saved as string. because of this unable to run Between query.
class SomeTable extends Model {
static table = 'some_table';
@field('created') created!: string;
@field('created_timestamp') createdTimeStamp!: number; // this we are in saving seconds == millisecond/1000
... some other fields
updateMessageRecord(data: any) {
this.created = data.created || this.created;
this.createdTimeStamp = parseInt(
`${new Date(data.created || this.created).getTime() / 1000}`,
10,
);
return this;
}
}
I am facing an issue where I want to run between query between two range timestamp values.But in SQLite DB number value saved as string. because of this unable to run Between query.
schema.ts
In DB created_timestamp saved as string. it should be number type.
is Any Issue with WatermelonDB to not taking number ?
version used
The text was updated successfully, but these errors were encountered: