pg-english
Convert english query to informal SQL SELECT.
NOTE: pg-slang can convert informal SQL to formal SQL.
var english = ;// english.token([type], [value]): token// english.number(<text>): processed text// english.unit(<text>): processed text// english.reserved(<text>): processed text// english.entity(<text>, <match fn>, [this]): Promise (processed text)// english(<text>, <match fn>, [this], [options])// -> Promise (processed text) // <match fn>(<texts>)// - texts: array of text// -> Promise {type, value, length}// - type: token type (table/column/row)// - value: token value// - hint: token hint (identifies table)// - length: token length (from start of texts) // options: {// table: undefined, // default table: none// columns: {<table>: []}, // default columns per table: none// } { var z = null txt = txts; iftxt z = type: 'column' value: 'ASCORBIC ACID' length: 2; else iftxt z = type: 'table' value: 'FOOD' length: 1; return Promise;};await ;// SELECT "ASCORBIC ACID" FROM "FOOD" WHERE ("ASCORBIC ACID" < 0.029)
Methods: