only-cliches / Nano-SQL

Universal database layer for the client, server & mobile devices. It's like Lego for databases.
https://nanosql.io
MIT License
781 stars 49 forks source link

TTL feature always status time -1 #207

Open thuykaka opened 4 years ago

thuykaka commented 4 years ago

Which version are you using? 2.3.7 Describe the bug When use TTL feature as

const [doc] = await nSQL('TABLE_NAME')
        .query('upsert', { /* data */ })
        .ttl(20)
        .exec()
const status = await nSQL('TABLE_NAME').expires(doc.id)

The output is

{ time: -1, cols: [] }

Expected behavior

{ time: 20, cols: [] }