select closure

node v14.20.1
version: 2.1.0
endpointsharetweet
const { QueryEntity, QueryExpression, SqlFormatter } = require("@themost/query") const Products = new QueryEntity('ProductData'); let query = new QueryExpression() .select(({ id, name, category, model, price}) => { id, name, category, model, price }) .from(Products) .where((x) => { return x.category === 'Laptops'; }).take(10); const sql = new SqlFormatter().format(query);
Loading…

no comments

    sign in to comment