"select datas.*,texts.name,texts.desc from datas,texts where datas.id = texts.id and datas.type & 0x4000 = 0 and (datas.alias = 0 or datas.id - datas.alias > 10) and (datas.id = $num or texts.name like ('%' || $query || '%') or texts.desc like ('%' || $query || '%'))",
);
statement.bind({
$num:possibleValueNumber,
$query:value,
});
constresults:any[]=[];
constresults:any[]=[];
while(statement.step()){
while(statement.step()){
results.push(statement.getAsObject());
results.push(statement.getAsObject());
}
}
statement.free();
statement.free();
returnresults;
}
privatequeryInDB(value:string,db:SQL.Database){
constpossibleValueNumber=parseInt(value)||0;
constresults=this.querySQL(
db,
`select datas.*,texts.name,texts.desc from datas,texts where datas.id = texts.id and ${commonFilter} and (datas.id = $num or texts.name like ('%' || $query || '%') or texts.desc like ('%' || $query || '%'))`,