Comparing version 0.3.2 to 0.4.0
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":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"}]}; | ||
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":"ifNull","url":"index.html#ifnull","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":78,"kind":64,"name":"update","url":"index.html#update","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":79,"kind":64,"name":"updateReturning","url":"index.html#updatereturning","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":80,"kind":64,"name":"insertReturning","url":"index.html#insertreturning","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":81,"kind":64,"name":"insert","url":"index.html#insert","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":82,"kind":64,"name":"insertOnConflictDoNothingReturning","url":"index.html#insertonconflictdonothingreturning","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":83,"kind":64,"name":"insertOnConflictDoNothing","url":"index.html#insertonconflictdonothing","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":84,"kind":64,"name":"insertOnConflictDoUpdateReturning","url":"index.html#insertonconflictdoupdatereturning","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":85,"kind":64,"name":"insertOnConflictDoUpdate","url":"index.html#insertonconflictdoupdate","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":86,"kind":64,"name":"insertManyReturning","url":"index.html#insertmanyreturning","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":87,"kind":64,"name":"insertMany","url":"index.html#insertmany","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":88,"kind":64,"name":"insertManyOnConflictDoNothingReturning","url":"index.html#insertmanyonconflictdonothingreturning","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":89,"kind":64,"name":"insertManyOnConflictDoNothing","url":"index.html#insertmanyonconflictdonothing","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":90,"kind":64,"name":"insertManyOnConflictDoUpdateReturning","url":"index.html#insertmanyonconflictdoupdatereturning","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":91,"kind":64,"name":"insertManyOnConflictDoUpdate","url":"index.html#insertmanyonconflictdoupdate","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":92,"kind":64,"name":"delete_","url":"index.html#delete_","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":93,"kind":2,"name":"pg","url":"modules/pg.html","classes":"tsd-kind-module"},{"id":94,"kind":64,"name":"query","url":"index.html#query","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":95,"kind":64,"name":"queryOne","url":"index.html#queryone","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":96,"kind":64,"name":"queryOneOrNone","url":"index.html#queryoneornone","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":97,"kind":64,"name":"queryStreaming","url":"index.html#querystreaming","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":98,"kind":64,"name":"restrict","url":"index.html#restrict","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":99,"kind":64,"name":"groupBy","url":"index.html#groupby","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":100,"kind":64,"name":"aggregate","url":"index.html#aggregate","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":101,"kind":64,"name":"inQuery","url":"index.html#inquery","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":102,"kind":64,"name":"exists","url":"index.html#exists","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":103,"kind":64,"name":"arbitrary","url":"index.html#arbitrary","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":104,"kind":64,"name":"leftJoin","url":"index.html#leftjoin","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":105,"kind":64,"name":"innerJoin","url":"index.html#innerjoin","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":106,"kind":64,"name":"inner","url":"index.html#inner","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":107,"kind":64,"name":"suchThat","url":"index.html#suchthat","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":108,"kind":64,"name":"select","url":"index.html#select","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":109,"kind":64,"name":"selectValues","url":"index.html#selectvalues","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":110,"kind":64,"name":"limit","url":"index.html#limit","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":111,"kind":64,"name":"order","url":"index.html#order","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":112,"kind":64,"name":"distinct","url":"index.html#distinct","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":113,"kind":64,"name":"isNull","url":"index.html#isnull","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":114,"kind":64,"name":"isNotNull","url":"index.html#isnotnull","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":115,"kind":64,"name":"not","url":"index.html#not","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":116,"kind":64,"name":"restrictEq","url":"index.html#restricteq","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":117,"kind":64,"name":"like","url":"index.html#like","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":118,"kind":64,"name":"ilike","url":"index.html#ilike","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":119,"kind":64,"name":"e","url":"index.html#e","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":120,"kind":2,"name":"Debug","url":"modules/debug.html","classes":"tsd-kind-module"},{"id":121,"kind":2,"name":"SqlType","url":"modules/sqltype.html","classes":"tsd-kind-module"},{"id":122,"kind":2,"name":"Unsafe","url":"modules/unsafe.html","classes":"tsd-kind-module"}]}; |
@@ -64,9 +64,9 @@ import * as pgLib from "pg"; | ||
export declare function avg<s>(col: Col<s, number>): Aggr<s, number>; | ||
export declare function avg<s>(col: Col<s, number>): Aggr<s, number | null>; | ||
export declare function sum<s>(col: Col<s, number>): Aggr<s, number>; | ||
export declare function max<s, a>(col: Col<s, a>): Aggr<s, a>; | ||
export declare function max<s, a>(col: Col<s, a>): Aggr<s, a | null>; | ||
export declare function min<s, a>(col: Col<s, a>): Aggr<s, a>; | ||
export declare function min<s, a>(col: Col<s, a>): Aggr<s, a | null>; | ||
@@ -148,2 +148,8 @@ export declare function inList<s, a>(lhs: Col<s, a>, rhs: Col<s, a>[]): Col<s, boolean>; | ||
/** | ||
* If the second value is null, return the first value. Otherwise return the | ||
* second value. | ||
*/ | ||
export declare function ifNull<s, a>(replacement: Col<s, a>, nullable: Col<s, a | null>): Col<s, a>; | ||
/** | ||
* Update rows of a table | ||
@@ -150,0 +156,0 @@ * |
{ | ||
"name": "zol", | ||
"version": "0.3.2", | ||
"version": "0.4.0", | ||
"description": "Type safe composable SQL abstraction layer", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -119,1 +119,9 @@ import { Exp } from "./Exp"; | ||
} | ||
/** | ||
* If the second value is null, return the first value. Otherwise return the | ||
* second value. | ||
*/ | ||
export function ifNull<s, a>(replacement: Col<s, a>, nullable: Col<s, a | null>): Col<s, a> { | ||
return matchNull(nullable, replacement, x => x); | ||
} |
@@ -18,3 +18,3 @@ import { Col, colUnwrap } from "./Column"; | ||
*/ | ||
export function compQuery<a>(scope: Scope, q: Query<any, a>): [number, SQL] { | ||
export function compQuery<a>(scope: Scope, q: Query<any, a>): SQL { | ||
const [cs, st] = runQueryM(scope, q); | ||
@@ -24,3 +24,3 @@ return compQuery2(cs, st); | ||
export function compQuery2<a>(cs: a, st: GenState): [number, SQL] { | ||
export function compQuery2<a>(cs: a, st: GenState): SQL { | ||
const final = finalCols(<any>cs); | ||
@@ -30,3 +30,2 @@ const sql = state2sql(st); | ||
const srcs = removeDeadCols(live, sql); | ||
const n: number = st.nameSupply; | ||
const s: SQL = { | ||
@@ -44,3 +43,3 @@ cols: final, | ||
}; | ||
return [n, s]; | ||
return s; | ||
} | ||
@@ -59,2 +58,13 @@ | ||
let globalNameSupply: number = 1; | ||
export function nextGlobalNameSupply(): number { | ||
globalNameSupply++; | ||
return globalNameSupply - 1; | ||
} | ||
export function resetGlobalNameSupply(): void { | ||
globalNameSupply = 0; | ||
} | ||
/** | ||
@@ -61,0 +71,0 @@ * @param cols object whose fields are all of type Col<s, a> |
@@ -24,3 +24,2 @@ import * as SqlType from "./SqlType"; | ||
Exp.ECol | | ||
Exp.ETblCol | | ||
Exp.ELit | | ||
@@ -49,7 +48,2 @@ Exp.EBinOp<sql, a> | | ||
export interface ETblCol { | ||
readonly type: "ETblCol"; | ||
readonly colNames: ColName[]; | ||
} | ||
export interface ELit { | ||
@@ -56,0 +50,0 @@ readonly type: "ELit"; |
import { assertNever } from "./assertNever"; | ||
import { compQuery, resetScope } from "./Compile"; | ||
import { compQuery, resetGlobalNameSupply, resetScope } from "./Compile"; | ||
import { runCustomQuery, runCustomQueryStreaming } from "./CustomQuery"; | ||
@@ -48,8 +48,9 @@ import * as Debug from "./Debug"; | ||
resetScope(); | ||
resetGlobalNameSupply(); | ||
const [n, sql] = compQuery(0, q); | ||
return query2(sqlTag, conn, n, sql); | ||
const sql = compQuery(0, q); | ||
return query2(sqlTag, conn, sql); | ||
} | ||
export async function query2<t extends object>(sqlTag: string | undefined, conn: pg.Client, _n: number, sql: SQL): Promise<t[]> { | ||
export async function query2<t extends object>(sqlTag: string | undefined, conn: pg.Client, sql: SQL): Promise<t[]> { | ||
if (Debug.enabled) { | ||
@@ -89,3 +90,3 @@ // tslint:disable-next-line:no-non-null-assertion | ||
export async function query2Streaming<t extends object>(sqlTag: string | undefined, conn: pg.Client, _n: number, sql: SQL, rowChunkSize: number): Promise<StreamingRows<t>> { | ||
export async function query2Streaming<t extends object>(sqlTag: string | undefined, conn: pg.Client, sql: SQL, rowChunkSize: number): Promise<StreamingRows<t>> { | ||
const [, sqlText, params] = compSql(sql); | ||
@@ -92,0 +93,0 @@ const pgParams = params.map(x => litToPgParam(x.param)); |
@@ -31,3 +31,2 @@ import { assertNever } from "./assertNever"; | ||
readonly groupCols: SomeCol<SQL>[]; | ||
readonly nameSupply: number; | ||
readonly nameScope: number; | ||
@@ -41,3 +40,2 @@ } | ||
groupCols: [], | ||
nameSupply: 0, | ||
nameScope: scope | ||
@@ -44,0 +42,0 @@ }; |
import { booleanCol, Col, colUnwrap, colWrap, numberCol } from "./Column"; | ||
import { compQuery2, freshScope, resetScope } from "./Compile"; | ||
import { compQuery2, freshScope, resetGlobalNameSupply, resetScope } from "./Compile"; | ||
import * as Debug from "./Debug"; | ||
@@ -35,7 +35,8 @@ import { QueryMetricsImpl } from "./Frontend"; | ||
resetScope(); | ||
resetGlobalNameSupply(); | ||
const mutQ: MutQuery = [initState(0)]; | ||
const result = q(<any>mutQ); | ||
const [n, sql] = compQuery2(result, mutQ[0]); | ||
return Frontend.query2<t>(sqlTag, conn, n, sql); | ||
const sql = compQuery2(result, mutQ[0]); | ||
return Frontend.query2<t>(sqlTag, conn, sql); | ||
} | ||
@@ -57,7 +58,8 @@ | ||
resetScope(); | ||
resetGlobalNameSupply(); | ||
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); | ||
const sql = compQuery2(result, mutQ[0]); | ||
return Frontend.query2Streaming<t>(sqlTag, conn, sql, rowChunkSize); | ||
} | ||
@@ -181,3 +183,3 @@ | ||
exp: colUnwrap(lhs), | ||
sql: compQuery2(result2, mutQ[0])[1], | ||
sql: compQuery2(result2, mutQ[0]), | ||
parser: SqlType.booleanParser | ||
@@ -217,3 +219,3 @@ }); | ||
type: "EExists", | ||
sql: compQuery2(result2, mutQ[0])[1], | ||
sql: compQuery2(result2, mutQ[0]), | ||
parser: SqlType.booleanParser | ||
@@ -220,0 +222,0 @@ }); |
@@ -10,4 +10,2 @@ import { assertNever } from "./assertNever"; | ||
return [exp.colName]; | ||
case "ETblCol": | ||
return exp.colNames; | ||
case "ELit": | ||
@@ -14,0 +12,0 @@ return []; |
@@ -1,2 +0,2 @@ | ||
import { Col, colUnwrap, colWrap } from "./Column"; | ||
import { Col, colUnwrap, colWrap, ifNull, numberCol } from "./Column"; | ||
import { compQuery, finalCols, freshScope } from "./Compile"; | ||
@@ -12,2 +12,3 @@ import { Exp, SomeCol } from "./Exp"; | ||
import { ColName, TableName } from "./Types"; | ||
import { Unsafe } from "./Unsafe"; | ||
@@ -372,19 +373,12 @@ function mkSome<sql, a>(val: Exp<sql, a>, parser: (val: string) => a): SomeCol<sql> { | ||
st => State.bind( | ||
( | ||
inner_st.sources.length === 1 | ||
? State.put({ | ||
...st, | ||
sources: [{ | ||
...inner_st.sources[0], | ||
distinct: true | ||
}] | ||
}) | ||
: State.put({ | ||
...st, | ||
sources: [sqlFrom(allCols(inner_st.sources), { | ||
type: "Product", | ||
sqls: inner_st.sources | ||
})] | ||
}) | ||
), | ||
(State.put({ | ||
...st, | ||
sources: [{ | ||
...sqlFrom(allCols(inner_st.sources), { | ||
type: "Product", | ||
sqls: inner_st.sources | ||
}), | ||
distinct: true | ||
}] | ||
})), | ||
() => State.pure(res) | ||
@@ -409,3 +403,3 @@ ) | ||
export function avg<s>(col: Col<s, number>): Aggr<s, number> { | ||
export function avg<s>(col: Col<s, number>): Aggr<s, number | null> { | ||
return <any>{ | ||
@@ -420,11 +414,16 @@ type: "EAggrEx", | ||
export function sum<s>(col: Col<s, number>): Aggr<s, number> { | ||
return <any>{ | ||
type: "EAggrEx", | ||
name: "SUM", | ||
exp: colUnwrap(col), | ||
parser: SqlType.numberParser | ||
}; | ||
return <any>colUnwrap( | ||
ifNull( | ||
Unsafe.unsafeCast(numberCol(0), "INT", SqlType.intParser), | ||
colWrap({ | ||
type: "EAggrEx", | ||
name: "SUM", | ||
exp: colUnwrap(col), | ||
parser: SqlType.numberParser | ||
}) | ||
) | ||
); | ||
} | ||
export function max<s, a>(col: Col<s, a>): Aggr<s, a> { | ||
export function max<s, a>(col: Col<s, a>): Aggr<s, a | null> { | ||
return <any>{ | ||
@@ -438,3 +437,3 @@ type: "EAggrEx", | ||
export function min<s, a>(col: Col<s, a>): Aggr<s, a> { | ||
export function min<s, a>(col: Col<s, a>): Aggr<s, a | null> { | ||
return <any>{ | ||
@@ -473,3 +472,3 @@ type: "EAggrEx", | ||
exp: colUnwrap(lhs), | ||
sql: compQuery(freshScope(), q2)[1], | ||
sql: compQuery(freshScope(), q2), | ||
parser: SqlType.booleanParser | ||
@@ -600,5 +599,2 @@ }); | ||
const exp = colUnwrap(col); | ||
if (exp.type === "ETblCol") { | ||
throw new Error("Unexpected exp type:: " + exp.type); | ||
} | ||
result.push([{ | ||
@@ -605,0 +601,0 @@ type: "Some", |
@@ -0,1 +1,2 @@ | ||
import { nextGlobalNameSupply } from "../Compile"; | ||
import { GenState, initState, Name, Scope, showName } from "../GenState"; | ||
@@ -85,6 +86,5 @@ import * as State from "../StateMonad"; | ||
st => State.bind( | ||
State.put({ | ||
...initState(st.nameScope), | ||
nameSupply: st.nameSupply | ||
}), | ||
State.put( | ||
initState(st.nameScope) | ||
), | ||
() => State.bind( | ||
@@ -95,6 +95,3 @@ q.unQ, | ||
st2 => State.bind( | ||
State.put({ | ||
...st, | ||
nameSupply: st2.nameSupply | ||
}), | ||
State.put(st), | ||
() => State.pure<GenState, [GenState, a]>([st2, x]) | ||
@@ -114,12 +111,6 @@ ) | ||
State.get(), | ||
st => State.bind( | ||
State.put({ | ||
...st, | ||
nameSupply: st.nameSupply + 1 | ||
}), | ||
() => State.pure({ | ||
scope: st.nameScope, | ||
ident: st.nameSupply | ||
}) | ||
) | ||
st => State.pure({ | ||
scope: st.nameScope, | ||
ident: nextGlobalNameSupply() | ||
}) | ||
); | ||
@@ -126,0 +117,0 @@ } |
@@ -201,4 +201,2 @@ import { assertNever } from "../assertNever"; | ||
switch (c.type) { | ||
case "ETblCol": | ||
throw new Error("compiler bug: ppCol saw TblCol: " + c.colNames); | ||
case "ECol": | ||
@@ -205,0 +203,0 @@ if (c.correlation === null) { |
@@ -5,3 +5,3 @@ export { ColName, TableName } from "./Types"; | ||
export { declareTable, TableDeclareCols, Table, ColInfo } from "./Table"; | ||
export { nullCol, numberCol, textCol, booleanCol, Col, ifThenElse, matchNull } from "./Column"; | ||
export { nullCol, numberCol, textCol, booleanCol, Col, ifThenElse, matchNull, ifNull } from "./Column"; | ||
export { update, updateReturning } from "./Update"; | ||
@@ -8,0 +8,0 @@ export { insertReturning, insert, insertOnConflictDoNothingReturning, insertOnConflictDoNothing, insertOnConflictDoUpdateReturning, insertOnConflictDoUpdate, insertManyReturning, insertMany, insertManyOnConflictDoNothingReturning, insertManyOnConflictDoNothing, insertManyOnConflictDoUpdateReturning, insertManyOnConflictDoUpdate } from "./Insert"; |
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 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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7179540
12520