alexiusacademia / electron-db

Electron module that acts as database management and uses flat file database (json file) to store tables.
MIT License
87 stars 24 forks source link

i got a problem at getRow(s) #34

Closed azwc closed 4 years ago

azwc commented 4 years ago

db file is ‘novel.json’, it's no data.

cond:

 { author: 'xx', source: 'xxx.cc', title: 'test' }

Query:

db.getRows('novel', location, cond, (succ, msg) => {
    console.log(succ);
    console.log(msg);
}

Output:

true
[]

Why?

alexiusacademia commented 4 years ago

wht do you mean by it's no data?

azwc commented 4 years ago

wht do you mean by it's no data?

novel.json

{
    "novel":[]
}

query by cond,expect false,but i got true.i thought true is that data exists,is not it?

alexiusacademia commented 4 years ago

True means it can be queried. The fact that the file exist means it can be. Empty result indicates that there are no results returned. Zero matching the query.