【文件属性】:
文件名称:sql-view:重写使用otions对象嵌入过滤器,排序,分组或分页的select语句
文件大小:58KB
文件格式:ZIP
更新时间:2021-05-10 07:25:34
JavaScript
sql视图
重写使用otions对象嵌入过滤器,订单,组或分页的select语句。 对于MS Sql Server和postgres
安装
$ npm install --save sql-view
用法
var sqlView = require ( 'sql-view' ) ( 'postgres' ) ;
// build(view, criteria)
var view = sqlView . build ( 'SELECT * FROM products' ) , {
where : {
price : {
lt : '1000'
}
} ) ;
console . log ( view ) ;
// => { statement: 'SELECT * FROM (SELECT * FROM "products") t WHERE "pric
【文件预览】:
sql-view-master
----docker_fish_history(146B)
----yarn.lock(108KB)
----.eslintrc.js(768B)
----src()
--------index.js(8KB)
----.circleci()
--------config.yml(3KB)
----LICENSE(1KB)
----test()
--------schemas()
--------spec.js(19KB)
--------index.js(4KB)
----.prettierrc(70B)
----README.md(5KB)
----docker-compose.yml(757B)
----.editorconfig(171B)
----.gitignore(49B)
----package.json(1KB)