Comparing version 0.1.5 to 0.1.6
{ | ||
"name": "zol", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Type safe composable SQL abstraction layer", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -153,33 +153,30 @@ import { Col, colUnwrap, colWrap } from "./Column"; | ||
State.bind( | ||
State.get(), | ||
st => State.bind( | ||
isolate(q), | ||
is => { | ||
const [gst, aggrs] = is; | ||
return State.bind( | ||
State.mapM(x => State.bind(rename(x[0]), y => State.pure<GenState, [SomeCol<SQL>, string, (val: string) => any]>([y, x[1], x[2]])), fromTup(aggrs)), | ||
(cs: [SomeCol<SQL>, string, (val: string) => any][]) => { | ||
const sql = state2sql(gst); | ||
const sql2: SQL = { | ||
cols: cs.map(x => x[0]), | ||
source: { | ||
type: "Product", | ||
sqls: [sql] | ||
}, | ||
restricts: [], | ||
groups: gst.groupCols, | ||
ordering: [], | ||
limits: null | ||
}; | ||
return State.bind( | ||
State.put({ | ||
...st, | ||
sources: [sql2].concat(st.sources) | ||
}), | ||
() => State.pure(toTup(someColNames2(cs))) | ||
); | ||
} | ||
); | ||
} | ||
) | ||
isolate(q), | ||
is => { | ||
const [gst, aggrs] = is; | ||
return State.bind( | ||
State.mapM(x => State.bind(rename(x[0]), y => State.pure<GenState, [SomeCol<SQL>, string, (val: string) => any]>([y, x[1], x[2]])), fromTup(aggrs)), | ||
(cs: [SomeCol<SQL>, string, (val: string) => any][]) => { | ||
const sql = state2sql(gst); | ||
const sql2: SQL = { | ||
cols: cs.map(x => x[0]), | ||
source: { | ||
type: "Product", | ||
sqls: [sql] | ||
}, | ||
restricts: [], | ||
groups: gst.groupCols, | ||
ordering: [], | ||
limits: null | ||
}; | ||
return State.bind( | ||
State.modify(st => ({ | ||
...st, | ||
sources: [sql2].concat(st.sources) | ||
})), | ||
() => State.pure(toTup(someColNames2(cs))) | ||
); | ||
} | ||
); | ||
} | ||
) | ||
@@ -186,0 +183,0 @@ ); |
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
10376
6088805