Socket
Socket
Sign inDemoInstall

zol

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zol - npm Package Compare versions

Comparing version 0.2.6 to 0.3.0

dist/docs/interfaces/streamingrows.html

2

dist/docs/assets/js/search.js
var typedoc = typedoc || {};
typedoc.search = typedoc.search || {};
typedoc.search.data = {"kinds":{"2":"Module","4":"Enumeration","16":"Enumeration member","64":"Function","128":"Class","256":"Interface","512":"Constructor","1024":"Property","2048":"Method","65536":"Type literal","4194304":"Type alias"},"rows":[{"id":0,"kind":128,"name":"ColName","url":"classes/colname.html","classes":"tsd-kind-class"},{"id":1,"kind":2048,"name":"wrap","url":"classes/colname.html#wrap","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-static","parent":"ColName"},{"id":2,"kind":2048,"name":"unwrap","url":"classes/colname.html#unwrap","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-static","parent":"ColName"},{"id":3,"kind":1024,"name":"dummy","url":"classes/colname.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"ColName"},{"id":4,"kind":128,"name":"TableName","url":"classes/tablename.html","classes":"tsd-kind-class"},{"id":5,"kind":2048,"name":"wrap","url":"classes/tablename.html#wrap","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-static","parent":"TableName"},{"id":6,"kind":2048,"name":"unwrap","url":"classes/tablename.html#unwrap","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-static","parent":"TableName"},{"id":7,"kind":1024,"name":"dummy","url":"classes/tablename.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"TableName"},{"id":8,"kind":4,"name":"Order","url":"enums/order.html","classes":"tsd-kind-enum"},{"id":9,"kind":16,"name":"Asc","url":"enums/order.html#asc","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Order"},{"id":10,"kind":16,"name":"Desc","url":"enums/order.html#desc","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Order"},{"id":11,"kind":16,"name":"AscNullsLast","url":"enums/order.html#ascnullslast","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Order"},{"id":12,"kind":16,"name":"DescNullsFirst","url":"enums/order.html#descnullsfirst","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Order"},{"id":13,"kind":16,"name":"AscNullsFirst","url":"enums/order.html#ascnullsfirst","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Order"},{"id":14,"kind":16,"name":"DescNullsLast","url":"enums/order.html#descnullslast","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Order"},{"id":15,"kind":128,"name":"Write","url":"classes/write.html","classes":"tsd-kind-class"},{"id":16,"kind":1024,"name":"dummy","url":"classes/write.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Write"},{"id":17,"kind":128,"name":"DefaultValue","url":"classes/defaultvalue.html","classes":"tsd-kind-class"},{"id":18,"kind":1024,"name":"dummy","url":"classes/defaultvalue.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"DefaultValue"},{"id":19,"kind":128,"name":"Aggr","url":"classes/aggr.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":20,"kind":1024,"name":"dummy","url":"classes/aggr.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Aggr"},{"id":21,"kind":128,"name":"Inner","url":"classes/inner.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":22,"kind":1024,"name":"dummy","url":"classes/inner.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Inner"},{"id":23,"kind":128,"name":"Table","url":"classes/table.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":24,"kind":1024,"name":"tableName","url":"classes/table.html#tablename","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Table"},{"id":25,"kind":1024,"name":"tableCols","url":"classes/table.html#tablecols","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Table"},{"id":26,"kind":1024,"name":"dummy","url":"classes/table.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Table"},{"id":27,"kind":256,"name":"ColInfo","url":"interfaces/colinfo.html","classes":"tsd-kind-interface"},{"id":28,"kind":1024,"name":"name","url":"interfaces/colinfo.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ColInfo"},{"id":29,"kind":1024,"name":"propName","url":"interfaces/colinfo.html#propname","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ColInfo"},{"id":30,"kind":1024,"name":"parser","url":"interfaces/colinfo.html#parser","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ColInfo"},{"id":31,"kind":65536,"name":"__type","url":"interfaces/colinfo.html#parser.__type","classes":"tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported","parent":"ColInfo.parser"},{"id":32,"kind":128,"name":"Col","url":"classes/col.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":33,"kind":1024,"name":"dummy","url":"classes/col.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Col"},{"id":34,"kind":128,"name":"ConflictTarget","url":"classes/conflicttarget.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":35,"kind":2048,"name":"tableColumns","url":"classes/conflicttarget.html#tablecolumns","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"ConflictTarget"},{"id":36,"kind":1024,"name":"dummy","url":"classes/conflicttarget.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"ConflictTarget"},{"id":37,"kind":128,"name":"Arbitrary","url":"classes/arbitrary.html","classes":"tsd-kind-class"},{"id":38,"kind":1024,"name":"dummy","url":"classes/arbitrary.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Arbitrary"},{"id":39,"kind":128,"name":"Q","url":"classes/q.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":40,"kind":1024,"name":"dummy","url":"classes/q.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Q"},{"id":41,"kind":128,"name":"ColumnParseError","url":"classes/columnparseerror.html","classes":"tsd-kind-class"},{"id":42,"kind":1024,"name":"query","url":"classes/columnparseerror.html#query","classes":"tsd-kind-property tsd-parent-kind-class","parent":"ColumnParseError"},{"id":43,"kind":1024,"name":"columnValue","url":"classes/columnparseerror.html#columnvalue","classes":"tsd-kind-property tsd-parent-kind-class","parent":"ColumnParseError"},{"id":44,"kind":1024,"name":"parseFunction","url":"classes/columnparseerror.html#parsefunction","classes":"tsd-kind-property tsd-parent-kind-class","parent":"ColumnParseError"},{"id":45,"kind":1024,"name":"innerError","url":"classes/columnparseerror.html#innererror","classes":"tsd-kind-property tsd-parent-kind-class","parent":"ColumnParseError"},{"id":46,"kind":1024,"name":"__proto__","url":"classes/columnparseerror.html#__proto__","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"ColumnParseError"},{"id":47,"kind":512,"name":"constructor","url":"classes/columnparseerror.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"ColumnParseError"},{"id":48,"kind":1024,"name":"name","url":"classes/columnparseerror.html#name","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"ColumnParseError"},{"id":49,"kind":1024,"name":"message","url":"classes/columnparseerror.html#message","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"ColumnParseError"},{"id":50,"kind":1024,"name":"stack","url":"classes/columnparseerror.html#stack","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-overwrite tsd-is-inherited","parent":"ColumnParseError"},{"id":51,"kind":1024,"name":"Error","url":"classes/columnparseerror.html#error","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-static","parent":"ColumnParseError"},{"id":52,"kind":4194304,"name":"MakeTable","url":"index.html#maketable","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":53,"kind":4194304,"name":"MakeCols","url":"index.html#makecols","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":54,"kind":65536,"name":"__type","url":"index.html#makecols.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"MakeCols"},{"id":55,"kind":64,"name":"defaultValue","url":"index.html#defaultvalue","classes":"tsd-kind-function"},{"id":56,"kind":64,"name":"count","url":"index.html#count","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":57,"kind":64,"name":"avg","url":"index.html#avg","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":58,"kind":64,"name":"sum","url":"index.html#sum","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":59,"kind":64,"name":"max","url":"index.html#max","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":60,"kind":64,"name":"min","url":"index.html#min","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":61,"kind":64,"name":"inList","url":"index.html#inlist","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":62,"kind":4194304,"name":"AggrCols","url":"index.html#aggrcols","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":63,"kind":65536,"name":"__type","url":"index.html#aggrcols.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"AggrCols"},{"id":64,"kind":4194304,"name":"LeftCols","url":"index.html#leftcols","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":65,"kind":65536,"name":"__type","url":"index.html#leftcols.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"LeftCols"},{"id":66,"kind":64,"name":"declareTable","url":"index.html#declaretable","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":67,"kind":4194304,"name":"TableDeclareCols","url":"index.html#tabledeclarecols","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":68,"kind":65536,"name":"__type","url":"index.html#tabledeclarecols.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"TableDeclareCols"},{"id":69,"kind":64,"name":"nullCol","url":"index.html#nullcol","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":70,"kind":64,"name":"numberCol","url":"index.html#numbercol","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":71,"kind":64,"name":"textCol","url":"index.html#textcol","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":72,"kind":64,"name":"booleanCol","url":"index.html#booleancol","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":73,"kind":64,"name":"ifThenElse","url":"index.html#ifthenelse","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":74,"kind":64,"name":"matchNull","url":"index.html#matchnull","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":75,"kind":64,"name":"update","url":"index.html#update","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":76,"kind":64,"name":"updateReturning","url":"index.html#updatereturning","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":77,"kind":64,"name":"insertReturning","url":"index.html#insertreturning","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":78,"kind":64,"name":"insert","url":"index.html#insert","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":79,"kind":64,"name":"insertOnConflictDoNothingReturning","url":"index.html#insertonconflictdonothingreturning","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":80,"kind":64,"name":"insertOnConflictDoNothing","url":"index.html#insertonconflictdonothing","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":81,"kind":64,"name":"insertOnConflictDoUpdateReturning","url":"index.html#insertonconflictdoupdatereturning","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":82,"kind":64,"name":"insertOnConflictDoUpdate","url":"index.html#insertonconflictdoupdate","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":83,"kind":64,"name":"insertManyReturning","url":"index.html#insertmanyreturning","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":84,"kind":64,"name":"insertMany","url":"index.html#insertmany","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":85,"kind":64,"name":"insertManyOnConflictDoNothingReturning","url":"index.html#insertmanyonconflictdonothingreturning","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":86,"kind":64,"name":"insertManyOnConflictDoNothing","url":"index.html#insertmanyonconflictdonothing","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":87,"kind":64,"name":"insertManyOnConflictDoUpdateReturning","url":"index.html#insertmanyonconflictdoupdatereturning","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":88,"kind":64,"name":"insertManyOnConflictDoUpdate","url":"index.html#insertmanyonconflictdoupdate","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":89,"kind":64,"name":"delete_","url":"index.html#delete_","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":90,"kind":2,"name":"pg","url":"modules/pg.html","classes":"tsd-kind-module"},{"id":91,"kind":64,"name":"query","url":"index.html#query","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":92,"kind":64,"name":"queryOne","url":"index.html#queryone","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":93,"kind":64,"name":"queryOneOrNone","url":"index.html#queryoneornone","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":94,"kind":64,"name":"restrict","url":"index.html#restrict","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":95,"kind":64,"name":"groupBy","url":"index.html#groupby","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":96,"kind":64,"name":"aggregate","url":"index.html#aggregate","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":97,"kind":64,"name":"inQuery","url":"index.html#inquery","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":98,"kind":64,"name":"exists","url":"index.html#exists","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":99,"kind":64,"name":"arbitrary","url":"index.html#arbitrary","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":100,"kind":64,"name":"leftJoin","url":"index.html#leftjoin","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":101,"kind":64,"name":"innerJoin","url":"index.html#innerjoin","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":102,"kind":64,"name":"inner","url":"index.html#inner","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":103,"kind":64,"name":"suchThat","url":"index.html#suchthat","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":104,"kind":64,"name":"select","url":"index.html#select","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":105,"kind":64,"name":"selectValues","url":"index.html#selectvalues","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":106,"kind":64,"name":"limit","url":"index.html#limit","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":107,"kind":64,"name":"order","url":"index.html#order","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":108,"kind":64,"name":"distinct","url":"index.html#distinct","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":109,"kind":64,"name":"isNull","url":"index.html#isnull","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":110,"kind":64,"name":"isNotNull","url":"index.html#isnotnull","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":111,"kind":64,"name":"not","url":"index.html#not","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":112,"kind":64,"name":"restrictEq","url":"index.html#restricteq","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":113,"kind":64,"name":"like","url":"index.html#like","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":114,"kind":64,"name":"ilike","url":"index.html#ilike","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":115,"kind":64,"name":"e","url":"index.html#e","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":116,"kind":2,"name":"Debug","url":"modules/debug.html","classes":"tsd-kind-module"},{"id":117,"kind":2,"name":"SqlType","url":"modules/sqltype.html","classes":"tsd-kind-module"},{"id":118,"kind":2,"name":"Unsafe","url":"modules/unsafe.html","classes":"tsd-kind-module"}]};
typedoc.search.data = {"kinds":{"2":"Module","4":"Enumeration","16":"Enumeration member","64":"Function","128":"Class","256":"Interface","512":"Constructor","1024":"Property","2048":"Method","65536":"Type literal","4194304":"Type alias"},"rows":[{"id":0,"kind":128,"name":"ColName","url":"classes/colname.html","classes":"tsd-kind-class"},{"id":1,"kind":2048,"name":"wrap","url":"classes/colname.html#wrap","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-static","parent":"ColName"},{"id":2,"kind":2048,"name":"unwrap","url":"classes/colname.html#unwrap","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-static","parent":"ColName"},{"id":3,"kind":1024,"name":"dummy","url":"classes/colname.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"ColName"},{"id":4,"kind":128,"name":"TableName","url":"classes/tablename.html","classes":"tsd-kind-class"},{"id":5,"kind":2048,"name":"wrap","url":"classes/tablename.html#wrap","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-static","parent":"TableName"},{"id":6,"kind":2048,"name":"unwrap","url":"classes/tablename.html#unwrap","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-static","parent":"TableName"},{"id":7,"kind":1024,"name":"dummy","url":"classes/tablename.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"TableName"},{"id":8,"kind":4,"name":"Order","url":"enums/order.html","classes":"tsd-kind-enum"},{"id":9,"kind":16,"name":"Asc","url":"enums/order.html#asc","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Order"},{"id":10,"kind":16,"name":"Desc","url":"enums/order.html#desc","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Order"},{"id":11,"kind":16,"name":"AscNullsLast","url":"enums/order.html#ascnullslast","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Order"},{"id":12,"kind":16,"name":"DescNullsFirst","url":"enums/order.html#descnullsfirst","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Order"},{"id":13,"kind":16,"name":"AscNullsFirst","url":"enums/order.html#ascnullsfirst","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Order"},{"id":14,"kind":16,"name":"DescNullsLast","url":"enums/order.html#descnullslast","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Order"},{"id":15,"kind":128,"name":"Write","url":"classes/write.html","classes":"tsd-kind-class"},{"id":16,"kind":1024,"name":"dummy","url":"classes/write.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Write"},{"id":17,"kind":128,"name":"DefaultValue","url":"classes/defaultvalue.html","classes":"tsd-kind-class"},{"id":18,"kind":1024,"name":"dummy","url":"classes/defaultvalue.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"DefaultValue"},{"id":19,"kind":128,"name":"Aggr","url":"classes/aggr.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":20,"kind":1024,"name":"dummy","url":"classes/aggr.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Aggr"},{"id":21,"kind":128,"name":"Inner","url":"classes/inner.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":22,"kind":1024,"name":"dummy","url":"classes/inner.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Inner"},{"id":23,"kind":128,"name":"Table","url":"classes/table.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":24,"kind":1024,"name":"tableName","url":"classes/table.html#tablename","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Table"},{"id":25,"kind":1024,"name":"tableCols","url":"classes/table.html#tablecols","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Table"},{"id":26,"kind":1024,"name":"dummy","url":"classes/table.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Table"},{"id":27,"kind":256,"name":"ColInfo","url":"interfaces/colinfo.html","classes":"tsd-kind-interface"},{"id":28,"kind":1024,"name":"name","url":"interfaces/colinfo.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ColInfo"},{"id":29,"kind":1024,"name":"propName","url":"interfaces/colinfo.html#propname","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ColInfo"},{"id":30,"kind":1024,"name":"parser","url":"interfaces/colinfo.html#parser","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ColInfo"},{"id":31,"kind":65536,"name":"__type","url":"interfaces/colinfo.html#parser.__type","classes":"tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported","parent":"ColInfo.parser"},{"id":32,"kind":128,"name":"Col","url":"classes/col.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":33,"kind":1024,"name":"dummy","url":"classes/col.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Col"},{"id":34,"kind":128,"name":"ConflictTarget","url":"classes/conflicttarget.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":35,"kind":2048,"name":"tableColumns","url":"classes/conflicttarget.html#tablecolumns","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"ConflictTarget"},{"id":36,"kind":1024,"name":"dummy","url":"classes/conflicttarget.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"ConflictTarget"},{"id":37,"kind":128,"name":"Arbitrary","url":"classes/arbitrary.html","classes":"tsd-kind-class"},{"id":38,"kind":1024,"name":"dummy","url":"classes/arbitrary.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Arbitrary"},{"id":39,"kind":128,"name":"Q","url":"classes/q.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":40,"kind":1024,"name":"dummy","url":"classes/q.html#dummy","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Q"},{"id":41,"kind":128,"name":"ColumnParseError","url":"classes/columnparseerror.html","classes":"tsd-kind-class"},{"id":42,"kind":1024,"name":"query","url":"classes/columnparseerror.html#query","classes":"tsd-kind-property tsd-parent-kind-class","parent":"ColumnParseError"},{"id":43,"kind":1024,"name":"columnValue","url":"classes/columnparseerror.html#columnvalue","classes":"tsd-kind-property tsd-parent-kind-class","parent":"ColumnParseError"},{"id":44,"kind":1024,"name":"parseFunction","url":"classes/columnparseerror.html#parsefunction","classes":"tsd-kind-property tsd-parent-kind-class","parent":"ColumnParseError"},{"id":45,"kind":1024,"name":"innerError","url":"classes/columnparseerror.html#innererror","classes":"tsd-kind-property tsd-parent-kind-class","parent":"ColumnParseError"},{"id":46,"kind":1024,"name":"__proto__","url":"classes/columnparseerror.html#__proto__","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"ColumnParseError"},{"id":47,"kind":512,"name":"constructor","url":"classes/columnparseerror.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"ColumnParseError"},{"id":48,"kind":1024,"name":"name","url":"classes/columnparseerror.html#name","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"ColumnParseError"},{"id":49,"kind":1024,"name":"message","url":"classes/columnparseerror.html#message","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"ColumnParseError"},{"id":50,"kind":1024,"name":"stack","url":"classes/columnparseerror.html#stack","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-overwrite tsd-is-inherited","parent":"ColumnParseError"},{"id":51,"kind":1024,"name":"Error","url":"classes/columnparseerror.html#error","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-static","parent":"ColumnParseError"},{"id":52,"kind":256,"name":"StreamingRows","url":"interfaces/streamingrows.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":53,"kind":2048,"name":"readAllRows","url":"interfaces/streamingrows.html#readallrows","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"StreamingRows"},{"id":54,"kind":4194304,"name":"MakeTable","url":"index.html#maketable","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":55,"kind":4194304,"name":"MakeCols","url":"index.html#makecols","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":56,"kind":65536,"name":"__type","url":"index.html#makecols.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"MakeCols"},{"id":57,"kind":64,"name":"defaultValue","url":"index.html#defaultvalue","classes":"tsd-kind-function"},{"id":58,"kind":64,"name":"count","url":"index.html#count","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":59,"kind":64,"name":"avg","url":"index.html#avg","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":60,"kind":64,"name":"sum","url":"index.html#sum","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":61,"kind":64,"name":"max","url":"index.html#max","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":62,"kind":64,"name":"min","url":"index.html#min","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":63,"kind":64,"name":"inList","url":"index.html#inlist","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":64,"kind":4194304,"name":"AggrCols","url":"index.html#aggrcols","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":65,"kind":65536,"name":"__type","url":"index.html#aggrcols.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"AggrCols"},{"id":66,"kind":4194304,"name":"LeftCols","url":"index.html#leftcols","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":67,"kind":65536,"name":"__type","url":"index.html#leftcols.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"LeftCols"},{"id":68,"kind":64,"name":"declareTable","url":"index.html#declaretable","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":69,"kind":4194304,"name":"TableDeclareCols","url":"index.html#tabledeclarecols","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":70,"kind":65536,"name":"__type","url":"index.html#tabledeclarecols.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"TableDeclareCols"},{"id":71,"kind":64,"name":"nullCol","url":"index.html#nullcol","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":72,"kind":64,"name":"numberCol","url":"index.html#numbercol","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":73,"kind":64,"name":"textCol","url":"index.html#textcol","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":74,"kind":64,"name":"booleanCol","url":"index.html#booleancol","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":75,"kind":64,"name":"ifThenElse","url":"index.html#ifthenelse","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":76,"kind":64,"name":"matchNull","url":"index.html#matchnull","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":77,"kind":64,"name":"update","url":"index.html#update","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":78,"kind":64,"name":"updateReturning","url":"index.html#updatereturning","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":79,"kind":64,"name":"insertReturning","url":"index.html#insertreturning","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":80,"kind":64,"name":"insert","url":"index.html#insert","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":81,"kind":64,"name":"insertOnConflictDoNothingReturning","url":"index.html#insertonconflictdonothingreturning","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":82,"kind":64,"name":"insertOnConflictDoNothing","url":"index.html#insertonconflictdonothing","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":83,"kind":64,"name":"insertOnConflictDoUpdateReturning","url":"index.html#insertonconflictdoupdatereturning","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":84,"kind":64,"name":"insertOnConflictDoUpdate","url":"index.html#insertonconflictdoupdate","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":85,"kind":64,"name":"insertManyReturning","url":"index.html#insertmanyreturning","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":86,"kind":64,"name":"insertMany","url":"index.html#insertmany","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":87,"kind":64,"name":"insertManyOnConflictDoNothingReturning","url":"index.html#insertmanyonconflictdonothingreturning","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":88,"kind":64,"name":"insertManyOnConflictDoNothing","url":"index.html#insertmanyonconflictdonothing","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":89,"kind":64,"name":"insertManyOnConflictDoUpdateReturning","url":"index.html#insertmanyonconflictdoupdatereturning","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":90,"kind":64,"name":"insertManyOnConflictDoUpdate","url":"index.html#insertmanyonconflictdoupdate","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":91,"kind":64,"name":"delete_","url":"index.html#delete_","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":92,"kind":2,"name":"pg","url":"modules/pg.html","classes":"tsd-kind-module"},{"id":93,"kind":64,"name":"query","url":"index.html#query","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":94,"kind":64,"name":"queryOne","url":"index.html#queryone","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":95,"kind":64,"name":"queryOneOrNone","url":"index.html#queryoneornone","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":96,"kind":64,"name":"queryStreaming","url":"index.html#querystreaming","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":97,"kind":64,"name":"restrict","url":"index.html#restrict","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":98,"kind":64,"name":"groupBy","url":"index.html#groupby","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":99,"kind":64,"name":"aggregate","url":"index.html#aggregate","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":100,"kind":64,"name":"inQuery","url":"index.html#inquery","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":101,"kind":64,"name":"exists","url":"index.html#exists","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":102,"kind":64,"name":"arbitrary","url":"index.html#arbitrary","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":103,"kind":64,"name":"leftJoin","url":"index.html#leftjoin","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":104,"kind":64,"name":"innerJoin","url":"index.html#innerjoin","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":105,"kind":64,"name":"inner","url":"index.html#inner","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":106,"kind":64,"name":"suchThat","url":"index.html#suchthat","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":107,"kind":64,"name":"select","url":"index.html#select","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":108,"kind":64,"name":"selectValues","url":"index.html#selectvalues","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":109,"kind":64,"name":"limit","url":"index.html#limit","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":110,"kind":64,"name":"order","url":"index.html#order","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":111,"kind":64,"name":"distinct","url":"index.html#distinct","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":112,"kind":64,"name":"isNull","url":"index.html#isnull","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":113,"kind":64,"name":"isNotNull","url":"index.html#isnotnull","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":114,"kind":64,"name":"not","url":"index.html#not","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":115,"kind":64,"name":"restrictEq","url":"index.html#restricteq","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":116,"kind":64,"name":"like","url":"index.html#like","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":117,"kind":64,"name":"ilike","url":"index.html#ilike","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":118,"kind":64,"name":"e","url":"index.html#e","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":119,"kind":2,"name":"Debug","url":"modules/debug.html","classes":"tsd-kind-module"},{"id":120,"kind":2,"name":"SqlType","url":"modules/sqltype.html","classes":"tsd-kind-module"},{"id":121,"kind":2,"name":"Unsafe","url":"modules/unsafe.html","classes":"tsd-kind-module"}]};

@@ -343,2 +343,15 @@ import * as pgLib from "pg";

/**
* Perform a query, but stream the results rather than loading them all into
* memory.
*
* After you call this function, you *must* call the `readAllRows` function, and
* you must call it while the connection is still open (and don't close the
* connection until it completes).
*
* @param sqlTag Will be injected as a comment into the SQL that is sent to the server. Useful for identifying the query during log analysis and performance analysis
* @param rowChunkSize How many rows to read and process during each iteration
*/
export declare function queryStreaming<t extends object>(sqlTag: string | undefined, conn: pg.Client, q: (q: Q<{}>) => MakeCols<{}, t>, rowChunkSize?: number): Promise<StreamingRows<t>>;
export declare function restrict<s>(q: Q<s>, expr: Col<s, boolean>): void;

@@ -555,2 +568,9 @@

}
export interface StreamingRows<T> {
/**
* Read in all of the results, the callback will be called multiple times,
* each time with a new batch of results.
*/
readAllRows(action: (results: T[]) => Promise<void>): Promise<void>;
}

@@ -557,0 +577,0 @@ export declare namespace Unsafe {

{
"name": "zol",
"version": "0.2.6",
"version": "0.3.0",
"description": "Type safe composable SQL abstraction layer",

@@ -49,3 +49,4 @@ "keywords": [

"dependencies": {
"@types/pg": ">=7.1.0 <=7.4.11"
"@types/pg": ">=7.1.0 <=7.4.11",
"pg-cursor": ">=2.0.0 <3"
},

@@ -52,0 +53,0 @@ "peerDependencies": {

import * as pgLib from "pg";
import { StreamingRows } from "./StreamingRows";
const Cursor = require("pg-cursor"); // tslint:disable-line:no-var-requires no-require-imports
/**

@@ -97,1 +100,123 @@ * Will be thrown during a query, if parsing of a column fails for any of the returned rows

};
const CustomCursor: any = function(this: any, propNames: any, propParsers: any, text: any, values: any) {
Cursor.call(this, text, values);
this.parseError = null;
this.propNames = propNames;
this.propParsers = propParsers;
this.numFields = this.propNames.length;
};
CustomCursor.prototype = Object.create(Cursor.prototype);
CustomCursor.prototype.constructor = Cursor;
CustomCursor.prototype.handleRowDescription = function(this: any) {
// Code was taken straight from the original Cursor source code:
this.state = "idle";
this._shiftQueue();
};
CustomCursor.prototype.handleDataRow = function(this: any, msg: any) {
const row: any = {};
if (this.parseError === null) {
for (let i = 0; i < this.numFields; ++i) {
// This try block is more broad than necessary.. we only expect
// an error to happen inside the call to:
//
// this.propParsers[i](..)
//
// But it is left as it is for efficiency. The other fragments
// of code cannot possibly throw an Error (famous last words)
try {
row[this.propNames[i]] =
msg.fields[i] !== null
? this.propParsers[i](msg.fields[i])
: null;
} catch (e) {
this.parseError = e;
this.parseErrorValue = msg.fields[i];
this.parseErrorParseFunction = this.propParsers[i].name;
}
}
}
// Code was taken straight from the original Cursor source code:
this.emit("row", row, this._result);
this._rows.push(row);
};
export function runCustomQueryStreaming(conn: pgLib.Client, propNames: string[], propParsers: ((val: string) => any)[], text: string, values: any, rowChunkSize: number): Promise<StreamingRows<any>> {
return new Promise<StreamingRows<any>>((resolve, reject) => {
const cursor = conn.query(new CustomCursor(propNames, propParsers, text, values));
// Read the first batch of results before we return from this function,
// so that if there is an SQL error it will be thrown here, rather than
// inside the StreamingRows' "readAllRows"
cursor.read(rowChunkSize, (err: any, rows: any) => {
if (<boolean>err) {
reject(err);
return;
}
if (rows.length === 0) {
resolve({
readAllRows: async (_action: (results: any[]) => Promise<void>): Promise<void> => {
return;
}
});
} else {
resolve({
readAllRows: (action: (results: any[]) => Promise<void>): Promise<void> => {
return new Promise<void>((resolve, reject) => {
let userError: null | any = null;
const next = (err: any, rows: any[]) => {
if (<boolean>err) {
reject(err);
return;
}
if (rows.length === 0) {
if (cursor.parseError !== null) {
reject(new ColumnParseError(
cursor.parseError.message,
text,
cursor.parseErrorValue,
cursor.parseErrorParseFunction,
cursor.parseError));
} else if (userError !== null) {
reject(userError);
} else {
resolve();
}
} else {
if (cursor.parseError === null && userError === null) {
action(rows).then(() => {
cursor.read(rowChunkSize, next);
}, (err) => {
userError = err;
cursor.read(rowChunkSize, next);
});
} else {
cursor.read(rowChunkSize, next);
}
}
};
if (cursor.parseError === null) {
action(rows).then(() => {
cursor.read(rowChunkSize, next);
}, (err) => {
userError = err;
cursor.read(rowChunkSize, next);
});
} else {
cursor.read(rowChunkSize, next);
}
});
}
});
}
});
});
}
import { assertNever } from "./assertNever";
import { compQuery, resetScope } from "./Compile";
import { runCustomQuery } from "./CustomQuery";
import { runCustomQuery, runCustomQueryStreaming } from "./CustomQuery";
import * as Debug from "./Debug";

@@ -11,2 +11,3 @@ import { pg } from "./pg";

import { Lit } from "./SqlType";
import { StreamingRows } from "./StreamingRows";

@@ -88,2 +89,9 @@ export class QueryMetricsImpl extends Debug.Debug.QueryMetrics {

export async function query2Streaming<t extends object>(sqlTag: string | undefined, conn: pg.Client, _n: number, sql: SQL, rowChunkSize: number): Promise<StreamingRows<t>> {
const [, sqlText, params] = compSql(sql);
const pgParams = params.map(x => litToPgParam(x.param));
const streamingRows = await runCustomQueryStreaming(conn, sql.cols.map((s: any) => s.propName), sql.cols.map((s: any) => s.parser), tagSql(sqlTag, sqlText), pgParams, rowChunkSize);
return streamingRows;
}
export function tagSql(sqlTag: string | undefined, sqlText: string): string {

@@ -90,0 +98,0 @@ return (sqlTag !== undefined && sqlTag !== "") ? (`/* ${sqlTag} */ ${sqlText}`) : sqlText;

@@ -12,2 +12,3 @@ import { booleanCol, Col, colUnwrap, colWrap, numberCol } from "./Column";

import { SqlType } from "./SqlType";
import { StreamingRows } from "./StreamingRows";
import { Table } from "./Table";

@@ -42,2 +43,23 @@ import { Unsafe } from "./Unsafe";

/**
* Perform a query, but stream the results rather than loading them all into
* memory.
*
* After you call this function, you *must* call the `readAllRows` function, and
* you must call it while the connection is still open (and don't close the
* connection until it completes).
*
* @param sqlTag Will be injected as a comment into the SQL that is sent to the server. Useful for identifying the query during log analysis and performance analysis
* @param rowChunkSize How many rows to read and process during each iteration
*/
export async function queryStreaming<t extends object>(sqlTag: string | undefined, conn: pg.Client, q: (q: Q<{}>) => MakeCols<{}, t>, rowChunkSize = 5000): Promise<StreamingRows<t>> {
// This ensures that the generated SQL will be the same for identical queries
resetScope();
const mutQ: MutQuery = [initState(0)];
const result = q(<any>mutQ);
const [n, sql] = compQuery2(result, mutQ[0]);
return Frontend.query2Streaming<t>(sqlTag, conn, n, sql, rowChunkSize);
}
export function select<s, a extends object, b extends object>(q: Q<s>, table: Table<a, b>): MakeCols<s, a & b> {

@@ -44,0 +66,0 @@ const mutQ: MutQuery = <any>q;

@@ -11,3 +11,3 @@ export { ColName, TableName } from "./Types";

export { pg } from "./pg";
export { query, queryOne, queryOneOrNone, restrict, groupBy, aggregate, inQuery, exists, Arbitrary, arbitrary, leftJoin, innerJoin, inner, suchThat, select, selectValues, limit, order, distinct, Q } from "./Imperative";
export { query, queryOne, queryOneOrNone, queryStreaming, restrict, groupBy, aggregate, inQuery, exists, Arbitrary, arbitrary, leftJoin, innerJoin, inner, suchThat, select, selectValues, limit, order, distinct, Q } from "./Imperative";
export { ColumnParseError } from "./CustomQuery";

@@ -18,2 +18,3 @@ export { isNull, isNotNull, not, restrictEq, like, ilike } from "./Operators";

export { SqlType } from "./SqlType";
export { StreamingRows } from "./StreamingRows";
export { Unsafe } from "./Unsafe";

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc