Implementation of relational algebra based on Mike Sperbers relational-algebra.scm.
Implementation of relational algebra based on Mike Sperbers relational-algebra.scm.
(->aggregation op expr)
Positional factory function for class sqlosure.relational_algebra.aggregation.
Positional factory function for class sqlosure.relational_algebra.aggregation.
(->aggregation-all op)
Positional factory function for class sqlosure.relational_algebra.aggregation-all.
Positional factory function for class sqlosure.relational_algebra.aggregation-all.
(->application rator rands)
Positional factory function for class sqlosure.relational_algebra.application.
Positional factory function for class sqlosure.relational_algebra.application.
(->attribute-ref name)
Positional factory function for class sqlosure.relational_algebra.attribute-ref.
Positional factory function for class sqlosure.relational_algebra.attribute-ref.
(->base-relation name scheme handle)
Positional factory function for class sqlosure.relational_algebra.base-relation.
Positional factory function for class sqlosure.relational_algebra.base-relation.
(->case-expr alist default)
Positional factory function for class sqlosure.relational_algebra.case-expr.
Positional factory function for class sqlosure.relational_algebra.case-expr.
(->combine rel-op query-1 query-2)
Positional factory function for class sqlosure.relational_algebra.combine.
Positional factory function for class sqlosure.relational_algebra.combine.
(->const type val)
Positional factory function for class sqlosure.relational_algebra.const.
Positional factory function for class sqlosure.relational_algebra.const.
(->empty-query)
Positional factory function for class sqlosure.relational_algebra.empty-query.
Positional factory function for class sqlosure.relational_algebra.empty-query.
(->group columns query)
Positional factory function for class sqlosure.relational_algebra.group.
Positional factory function for class sqlosure.relational_algebra.group.
(->null type)
Positional factory function for class sqlosure.relational_algebra.null.
Positional factory function for class sqlosure.relational_algebra.null.
(->order alist query)
Positional factory function for class sqlosure.relational_algebra.order.
Positional factory function for class sqlosure.relational_algebra.order.
(->project alist query)
Positional factory function for class sqlosure.relational_algebra.project.
Positional factory function for class sqlosure.relational_algebra.project.
(->rator name range-type-proc proc data)
Positional factory function for class sqlosure.relational_algebra.rator.
Positional factory function for class sqlosure.relational_algebra.rator.
(->rel-scheme columns map grouped)
Positional factory function for class sqlosure.relational_algebra.rel-scheme.
Positional factory function for class sqlosure.relational_algebra.rel-scheme.
(->restrict exp query)
Positional factory function for class sqlosure.relational_algebra.restrict.
Positional factory function for class sqlosure.relational_algebra.restrict.
(->restrict-outer exp query)
Positional factory function for class sqlosure.relational_algebra.restrict-outer.
Positional factory function for class sqlosure.relational_algebra.restrict-outer.
(->scalar-subquery query)
Positional factory function for class sqlosure.relational_algebra.scalar-subquery.
Positional factory function for class sqlosure.relational_algebra.scalar-subquery.
(->set-subquery query)
Positional factory function for class sqlosure.relational_algebra.set-subquery.
Positional factory function for class sqlosure.relational_algebra.set-subquery.
(->top offset count query)
Positional factory function for class sqlosure.relational_algebra.top.
Positional factory function for class sqlosure.relational_algebra.top.
(->tuple expressions)
Positional factory function for class sqlosure.relational_algebra.tuple.
Positional factory function for class sqlosure.relational_algebra.tuple.
(aggregate? expr)
Returns true if expr
is or contains an aggregation.
Returns true if `expr` is or contains an aggregation.
(aggregation-all-operator rec__2313__auto__)
(aggregation-all-operator data__2314__auto__ v__2315__auto__)
Lens for the op
field from a [[aggregation-all]] record. See sqlosure.relational-algebra/really-make-aggregation-all
.
Lens for the `op` field from a [[aggregation-all]] record. See [[sqlosure.relational-algebra/really-make-aggregation-all]].
(aggregation-all? thing)
Is object a aggregation-all
record? See sqlosure.relational-algebra/really-make-aggregation-all
.
Is object a `aggregation-all` record? See [[sqlosure.relational-algebra/really-make-aggregation-all]].
(aggregation-expr rec__2313__auto__)
(aggregation-expr data__2314__auto__ v__2315__auto__)
Lens for the expr
field from a [[aggregation]] record. See sqlosure.relational-algebra/really-make-aggregation
.
Lens for the `expr` field from a [[aggregation]] record. See [[sqlosure.relational-algebra/really-make-aggregation]].
(aggregation-operator rec__2313__auto__)
(aggregation-operator data__2314__auto__ v__2315__auto__)
Lens for the op
field from a [[aggregation]] record. See sqlosure.relational-algebra/really-make-aggregation
.
Lens for the `op` field from a [[aggregation]] record. See [[sqlosure.relational-algebra/really-make-aggregation]].
(aggregation? thing)
Is object a aggregation
record? See sqlosure.relational-algebra/really-make-aggregation
.
Is object a `aggregation` record? See [[sqlosure.relational-algebra/really-make-aggregation]].
(aggregations-op? k)
Is a thing an aggregation operation?
Is a thing an aggregation operation?
(alist->rel-scheme alist)
Construct a relational scheme from an alist of [column-name type]
.
Construct a relational scheme from an alist of `[column-name type]`.
(application-rands rec__2313__auto__)
(application-rands data__2314__auto__ v__2315__auto__)
Lens for the rands
field from a [[application]] record. See sqlosure.relational-algebra/really-make-application
.
Lens for the `rands` field from a [[application]] record. See [[sqlosure.relational-algebra/really-make-application]].
(application-rator rec__2313__auto__)
(application-rator data__2314__auto__ v__2315__auto__)
Lens for the rator
field from a [[application]] record. See sqlosure.relational-algebra/really-make-application
.
Lens for the `rator` field from a [[application]] record. See [[sqlosure.relational-algebra/really-make-application]].
(application? thing)
Is object a application
record? See sqlosure.relational-algebra/really-make-application
.
Is object a `application` record? See [[sqlosure.relational-algebra/really-make-application]].
(attach-rel-scheme-cache query fun)
Attach a rel-scheme cache to query.
query
is the queryfun
is a function accepting an environment, yielding the scheme of the queryAttach a rel-scheme cache to query. - `query` is the query - `fun` is a function accepting an environment, yielding the scheme of the query
(attribute-ref-name rec__2313__auto__)
(attribute-ref-name data__2314__auto__ v__2315__auto__)
Lens for the name
field from a [[attribute-ref]] record. See sqlosure.relational-algebra/make-attribute-ref
.
Lens for the `name` field from a [[attribute-ref]] record. See [[sqlosure.relational-algebra/make-attribute-ref]].
(attribute-ref? thing)
Is object a attribute-ref
record? See sqlosure.relational-algebra/make-attribute-ref
.
Is object a `attribute-ref` record? See [[sqlosure.relational-algebra/make-attribute-ref]].
(base-relation-handle rec__2313__auto__)
(base-relation-handle data__2314__auto__ v__2315__auto__)
Lens for the handle
field from a [[base-relation]] record. See sqlosure.relational-algebra/really-make-base-relation
.
Lens for the `handle` field from a [[base-relation]] record. See [[sqlosure.relational-algebra/really-make-base-relation]].
(base-relation-name rec__2313__auto__)
(base-relation-name data__2314__auto__ v__2315__auto__)
Lens for the name
field from a [[base-relation]] record. See sqlosure.relational-algebra/really-make-base-relation
.
Lens for the `name` field from a [[base-relation]] record. See [[sqlosure.relational-algebra/really-make-base-relation]].
(base-relation-scheme rec__2313__auto__)
(base-relation-scheme data__2314__auto__ v__2315__auto__)
Lens for the scheme
field from a [[base-relation]] record. See sqlosure.relational-algebra/really-make-base-relation
.
Lens for the `scheme` field from a [[base-relation]] record. See [[sqlosure.relational-algebra/really-make-base-relation]].
(base-relation? thing)
Is object a base-relation
record? See sqlosure.relational-algebra/really-make-base-relation
.
Is object a `base-relation` record? See [[sqlosure.relational-algebra/really-make-base-relation]].
(case-expr-alist rec__2313__auto__)
(case-expr-alist data__2314__auto__ v__2315__auto__)
Lens for the alist
field from a [[case-expr]] record. See sqlosure.relational-algebra/make-case-expr
.
Lens for the `alist` field from a [[case-expr]] record. See [[sqlosure.relational-algebra/make-case-expr]].
(case-expr-default rec__2313__auto__)
(case-expr-default data__2314__auto__ v__2315__auto__)
Lens for the default
field from a [[case-expr]] record. See sqlosure.relational-algebra/make-case-expr
.
Lens for the `default` field from a [[case-expr]] record. See [[sqlosure.relational-algebra/make-case-expr]].
(case-expr? thing)
Is object a case-expr
record? See sqlosure.relational-algebra/make-case-expr
.
Is object a `case-expr` record? See [[sqlosure.relational-algebra/make-case-expr]].
(combine-query-1 rec__2313__auto__)
(combine-query-1 data__2314__auto__ v__2315__auto__)
Lens for the query-1
field from a [[combine]] record. See sqlosure.relational-algebra/really-make-combine
.
Lens for the `query-1` field from a [[combine]] record. See [[sqlosure.relational-algebra/really-make-combine]].
(combine-query-2 rec__2313__auto__)
(combine-query-2 data__2314__auto__ v__2315__auto__)
Lens for the query-2
field from a [[combine]] record. See sqlosure.relational-algebra/really-make-combine
.
Lens for the `query-2` field from a [[combine]] record. See [[sqlosure.relational-algebra/really-make-combine]].
(combine-rel-op rec__2313__auto__)
(combine-rel-op data__2314__auto__ v__2315__auto__)
Lens for the rel-op
field from a [[combine]] record. See sqlosure.relational-algebra/really-make-combine
.
Lens for the `rel-op` field from a [[combine]] record. See [[sqlosure.relational-algebra/really-make-combine]].
(combine? thing)
Is object a combine
record? See sqlosure.relational-algebra/really-make-combine
.
Is object a `combine` record? See [[sqlosure.relational-algebra/really-make-combine]].
(compose-environments e1 e2)
Combine two environments. e1 takes precedence over e2.
Combine two environments. e1 takes precedence over e2.
(const-null? thing)
Is object a null
record? See sqlosure.relational-algebra/make-null
.
Is object a `null` record? See [[sqlosure.relational-algebra/make-null]].
(const-type rec__2313__auto__)
(const-type data__2314__auto__ v__2315__auto__)
Lens for the type
field from a [[const]] record. See sqlosure.relational-algebra/make-const
.
Lens for the `type` field from a [[const]] record. See [[sqlosure.relational-algebra/make-const]].
(const-val rec__2313__auto__)
(const-val data__2314__auto__ v__2315__auto__)
Lens for the val
field from a [[const]] record. See sqlosure.relational-algebra/make-const
.
Lens for the `val` field from a [[const]] record. See [[sqlosure.relational-algebra/make-const]].
(const? thing)
Is object a const
record? See sqlosure.relational-algebra/make-const
.
Is object a `const` record? See [[sqlosure.relational-algebra/make-const]].
(count-aggregations e)
Count all aggregations in an expression.
Count all aggregations in an expression.
(cull-substitution-alist alist underlying)
Takes an map and a 'underlying' query and returns a map of
substitutions not already featured in underlying
.
Takes an map and a 'underlying' query and returns a map of substitutions not already featured in `underlying`.
(distinct-q-query rec__2313__auto__)
(distinct-q-query data__2314__auto__ v__2315__auto__)
Lens for the query
field from a DistinctQ
record. See sqlosure.relational-algebra/really-make-distinct-q
.
Lens for the `query` field from a [[DistinctQ]] record. See [[sqlosure.relational-algebra/really-make-distinct-q]].
(distinct-q? thing)
Is object a DistinctQ
record? See sqlosure.relational-algebra/really-make-distinct-q
.
Is object a `DistinctQ` record? See [[sqlosure.relational-algebra/really-make-distinct-q]].
(empty-query? thing)
Is object a empty-query
record? See sqlosure.relational-algebra/make-empty-query
.
Is object a `empty-query` record? See [[sqlosure.relational-algebra/make-empty-query]].
(ensure-aggregations-op! k f)
Takes a k
and runs function f
if k
is an aggregations-op?
.
Otherwise, throws an assertion violation.
Takes a `k` and runs function `f` if `k` is an [[aggregations-op?]]. Otherwise, throws an assertion violation.
(expression-attribute-names expr)
Takes an expression and returns a set of all attribute-ref's names.
Takes an expression and returns a set of all attribute-ref's names.
(expression-type env expr)
expression-type
takes an environment map and an expression and tries to
find the expressions type (either based on expr itself or on the
mappings of the env).
`expression-type` takes an environment map and an expression and tries to find the expressions type (either based on expr itself or on the mappings of the env).
(fold-expression on-attribute-ref
on-const
on-null
on-application
on-tuple
on-aggregation
on-aggregation-all
on-case
on-scalar-subquery
on-set-subquery
expr)
(group-columns rec__2313__auto__)
(group-columns data__2314__auto__ v__2315__auto__)
Lens for the columns
field (set of columns to group by) from a [[group]] record. See sqlosure.relational-algebra/really-make-group
.
Lens for the `columns` field (set of columns to group by) from a [[group]] record. See [[sqlosure.relational-algebra/really-make-group]].
(group-query rec__2313__auto__)
(group-query data__2314__auto__ v__2315__auto__)
Lens for the query
field (underlying query) from a [[group]] record. See sqlosure.relational-algebra/really-make-group
.
Lens for the `query` field (underlying query) from a [[group]] record. See [[sqlosure.relational-algebra/really-make-group]].
(group? thing)
Is object a group
record? See sqlosure.relational-algebra/really-make-group
.
Is object a `group` record? See [[sqlosure.relational-algebra/really-make-group]].
(lookup-env name env)
Lookup a name in an environment.
Lookup a name in an environment.
(make-aggregation op)
(make-aggregation op expr)
Returns an aggregation. If supplied with only the op
, returns aggregation
that operates on the whole query. If supplied with an expression, returns
aggregation that operates on the result of this expression only.
Returns an aggregation. If supplied with only the `op`, returns aggregation that operates on the whole query. If supplied with an expression, returns aggregation that operates on the result of this expression only.
(make-attribute-ref name)
Construct a attribute-ref
record.
name
: access via sqlosure.relational-algebra/attribute-ref-name
Construct a `attribute-ref` record. `name`: access via [[sqlosure.relational-algebra/attribute-ref-name]]
(make-base-relation name
scheme
&
{:keys [universe handle] :or {universe nil handle nil}})
Returns a new base relation. If :handle is supplied, use is as base-relation-handle, defaults to nil. If :universe is supplied, return a vector of [relation universe]
Returns a new base relation. If :handle is supplied, use is as base-relation-handle, defaults to nil. If :universe is supplied, return a vector of [relation universe]
(make-case-expr alist default)
Construct a case-expr
record.
alist
: access via sqlosure.relational-algebra/case-expr-alist
default
: access via sqlosure.relational-algebra/case-expr-default
Construct a `case-expr` record. `alist`: access via [[sqlosure.relational-algebra/case-expr-alist]] `default`: access via [[sqlosure.relational-algebra/case-expr-default]]
(make-const type val)
Construct a const
record.
type
: access via sqlosure.relational-algebra/const-type
val
: access via sqlosure.relational-algebra/const-val
Construct a `const` record. `type`: access via [[sqlosure.relational-algebra/const-type]] `val`: access via [[sqlosure.relational-algebra/const-val]]
(make-empty-query)
Construct a empty-query
record.
Construct a `empty-query` record.
(make-extend alist query)
Creates a projection of some attributes while keeping all other attributes in the relation visible too.
Creates a projection of some attributes while keeping all other attributes in the relation visible too.
(make-group columns query)
Make a grouped query from a basic query.
columns
is a seq of columns to be grouped byquery
is the underlying queryMake a grouped query from a basic query. - `columns` is a seq of columns to be grouped by - `query` is the underlying query
(make-monomorphic-combinator name domains range proc & {:keys [universe data]})
(make-monomorphic-rator name
domain-types
range-type
proc
&
{:keys [universe data]})
(make-null type)
Construct a null
record.
type
: access via sqlosure.relational-algebra/null-type
Construct a `null` record. `type`: access via [[sqlosure.relational-algebra/null-type]]
(make-rel-scheme-cache fun)
Make a rel-scheme cache.
fun
is a function accepting an environment, producing the schemeMake a rel-scheme cache. - `fun` is a function accepting an environment, producing the scheme
(make-restrict exp query)
Create a restriction:
exp
is a boolean expression, acting as a filterquery
is the underlying queryCreate a restriction: - `exp` is a boolean expression, acting as a filter - `query` is the underlying query
(make-restrict-outer exp query)
Restrict a right-hand side of a left-outer product.
Restrict a right-hand side of a left-outer product.
(make-scalar-subquery query)
Construct a scalar-subquery
record.
query
: access via sqlosure.relational-algebra/scalar-subquery-query
Construct a `scalar-subquery` record. `query`: access via [[sqlosure.relational-algebra/scalar-subquery-query]]
(make-set-subquery query)
Construct a set-subquery
record.
query
: access via sqlosure.relational-algebra/set-subquery-query
Construct a `set-subquery` record. `query`: access via [[sqlosure.relational-algebra/set-subquery-query]]
(make-top offset count query)
The top count
entries, optionally starting at offset
, defaulting to 0.
The top `count` entries, optionally starting at `offset`, defaulting to 0.
(make-tuple expressions)
Construct a tuple
record.
expressions
: access via sqlosure.relational-algebra/tuple-expressions
Construct a `tuple` record. `expressions`: access via [[sqlosure.relational-algebra/tuple-expressions]]
(map->aggregation m__2330__auto__)
Factory function for class sqlosure.relational_algebra.aggregation, taking a map of keywords to field values.
Factory function for class sqlosure.relational_algebra.aggregation, taking a map of keywords to field values.
(map->aggregation-all m__2330__auto__)
Factory function for class sqlosure.relational_algebra.aggregation-all, taking a map of keywords to field values.
Factory function for class sqlosure.relational_algebra.aggregation-all, taking a map of keywords to field values.
(map->application m__2330__auto__)
Factory function for class sqlosure.relational_algebra.application, taking a map of keywords to field values.
Factory function for class sqlosure.relational_algebra.application, taking a map of keywords to field values.
(map->attribute-ref m__2330__auto__)
Factory function for class sqlosure.relational_algebra.attribute-ref, taking a map of keywords to field values.
Factory function for class sqlosure.relational_algebra.attribute-ref, taking a map of keywords to field values.
(map->base-relation m__2330__auto__)
Factory function for class sqlosure.relational_algebra.base-relation, taking a map of keywords to field values.
Factory function for class sqlosure.relational_algebra.base-relation, taking a map of keywords to field values.
(map->case-expr m__2330__auto__)
Factory function for class sqlosure.relational_algebra.case-expr, taking a map of keywords to field values.
Factory function for class sqlosure.relational_algebra.case-expr, taking a map of keywords to field values.
(map->combine m__2330__auto__)
Factory function for class sqlosure.relational_algebra.combine, taking a map of keywords to field values.
Factory function for class sqlosure.relational_algebra.combine, taking a map of keywords to field values.
(map->const m__2330__auto__)
Factory function for class sqlosure.relational_algebra.const, taking a map of keywords to field values.
Factory function for class sqlosure.relational_algebra.const, taking a map of keywords to field values.
(map->empty-query m__2330__auto__)
Factory function for class sqlosure.relational_algebra.empty-query, taking a map of keywords to field values.
Factory function for class sqlosure.relational_algebra.empty-query, taking a map of keywords to field values.
(map->group m__2330__auto__)
Factory function for class sqlosure.relational_algebra.group, taking a map of keywords to field values.
Factory function for class sqlosure.relational_algebra.group, taking a map of keywords to field values.
(map->null m__2330__auto__)
Factory function for class sqlosure.relational_algebra.null, taking a map of keywords to field values.
Factory function for class sqlosure.relational_algebra.null, taking a map of keywords to field values.
(map->order m__2330__auto__)
Factory function for class sqlosure.relational_algebra.order, taking a map of keywords to field values.
Factory function for class sqlosure.relational_algebra.order, taking a map of keywords to field values.
(map->project m__2330__auto__)
Factory function for class sqlosure.relational_algebra.project, taking a map of keywords to field values.
Factory function for class sqlosure.relational_algebra.project, taking a map of keywords to field values.
(map->rator m__2330__auto__)
Factory function for class sqlosure.relational_algebra.rator, taking a map of keywords to field values.
Factory function for class sqlosure.relational_algebra.rator, taking a map of keywords to field values.
(map->rel-scheme m__2330__auto__)
Factory function for class sqlosure.relational_algebra.rel-scheme, taking a map of keywords to field values.
Factory function for class sqlosure.relational_algebra.rel-scheme, taking a map of keywords to field values.
(map->restrict m__2330__auto__)
Factory function for class sqlosure.relational_algebra.restrict, taking a map of keywords to field values.
Factory function for class sqlosure.relational_algebra.restrict, taking a map of keywords to field values.
(map->restrict-outer m__2330__auto__)
Factory function for class sqlosure.relational_algebra.restrict-outer, taking a map of keywords to field values.
Factory function for class sqlosure.relational_algebra.restrict-outer, taking a map of keywords to field values.
(map->scalar-subquery m__2330__auto__)
Factory function for class sqlosure.relational_algebra.scalar-subquery, taking a map of keywords to field values.
Factory function for class sqlosure.relational_algebra.scalar-subquery, taking a map of keywords to field values.
(map->set-subquery m__2330__auto__)
Factory function for class sqlosure.relational_algebra.set-subquery, taking a map of keywords to field values.
Factory function for class sqlosure.relational_algebra.set-subquery, taking a map of keywords to field values.
(map->top m__2330__auto__)
Factory function for class sqlosure.relational_algebra.top, taking a map of keywords to field values.
Factory function for class sqlosure.relational_algebra.top, taking a map of keywords to field values.
(map->tuple m__2330__auto__)
Factory function for class sqlosure.relational_algebra.tuple, taking a map of keywords to field values.
Factory function for class sqlosure.relational_algebra.tuple, taking a map of keywords to field values.
(null-lift-binary-predicate pred)
Helper for defining rators. Takes a predicate and returns a function that takes two values to apply this predicate to.
Helper for defining rators. Takes a predicate and returns a function that takes two values to apply this predicate to.
(null-type rec__2313__auto__)
(null-type data__2314__auto__ v__2315__auto__)
Lens for the type
field from a [[null]] record. See sqlosure.relational-algebra/make-null
.
Lens for the `type` field from a [[null]] record. See [[sqlosure.relational-algebra/make-null]].
(order-alist rec__2313__auto__)
(order-alist data__2314__auto__ v__2315__auto__)
Lens for the alist
field from a [[order]] record. See sqlosure.relational-algebra/really-make-order
.
Lens for the `alist` field from a [[order]] record. See [[sqlosure.relational-algebra/really-make-order]].
(order-query rec__2313__auto__)
(order-query data__2314__auto__ v__2315__auto__)
Lens for the query
field from a [[order]] record. See sqlosure.relational-algebra/really-make-order
.
Lens for the `query` field from a [[order]] record. See [[sqlosure.relational-algebra/really-make-order]].
(order? thing)
Is object a order
record? See sqlosure.relational-algebra/really-make-order
.
Is object a `order` record? See [[sqlosure.relational-algebra/really-make-order]].
(project-aggregate? pr)
Test whether a project contains aggregate right-hand sides.
Test whether a project contains aggregate right-hand sides.
(project-alist rec__2313__auto__)
(project-alist data__2314__auto__ v__2315__auto__)
Lens for the alist
field (Maps newly bound attribute names to expressions.) from a [[project]] record. See sqlosure.relational-algebra/really-really-make-project
.
Lens for the `alist` field (Maps newly bound attribute names to expressions.) from a [[project]] record. See [[sqlosure.relational-algebra/really-really-make-project]].
(project-alist-aggregate? alist)
Test whether a project alist contains aggregate right-hand sides.
Test whether a project alist contains aggregate right-hand sides.
(project-query rec__2313__auto__)
(project-query data__2314__auto__ v__2315__auto__)
Lens for the query
field from a [[project]] record. See sqlosure.relational-algebra/really-really-make-project
.
Lens for the `query` field from a [[project]] record. See [[sqlosure.relational-algebra/really-really-make-project]].
(project? thing)
Is object a project
record? See sqlosure.relational-algebra/really-really-make-project
.
Is object a `project` record? See [[sqlosure.relational-algebra/really-really-make-project]].
(query-attribute-names q)
Assuming this is a sub-query of an expression, determine what attribute names of the underlying query it uses.
Assuming this is a sub-query of an expression, determine what attribute names of the underlying query it uses.
(query-scheme q)
(query-scheme q env)
Return the query scheme of query q
as a rel-scheme
.
Return the query scheme of query `q` as a `rel-scheme`.
(query? obj)
Returns true if the obj
is a query.
Returns true if the `obj` is a query.
(rator-data rec__2313__auto__)
(rator-data data__2314__auto__ v__2315__auto__)
Lens for the data
field from a [[rator]] record. See sqlosure.relational-algebra/really-make-rator
.
Lens for the `data` field from a [[rator]] record. See [[sqlosure.relational-algebra/really-make-rator]].
(rator-name rec__2313__auto__)
(rator-name data__2314__auto__ v__2315__auto__)
Lens for the name
field from a [[rator]] record. See sqlosure.relational-algebra/really-make-rator
.
Lens for the `name` field from a [[rator]] record. See [[sqlosure.relational-algebra/really-make-rator]].
(rator-proc rec__2313__auto__)
(rator-proc data__2314__auto__ v__2315__auto__)
Lens for the proc
field from a [[rator]] record. See sqlosure.relational-algebra/really-make-rator
.
Lens for the `proc` field from a [[rator]] record. See [[sqlosure.relational-algebra/really-make-rator]].
(rator-range-type-proc rec__2313__auto__)
(rator-range-type-proc data__2314__auto__ v__2315__auto__)
Lens for the range-type-proc
field from a [[rator]] record. See sqlosure.relational-algebra/really-make-rator
.
Lens for the `range-type-proc` field from a [[rator]] record. See [[sqlosure.relational-algebra/really-make-rator]].
(rator? thing)
Is object a rator
record? See sqlosure.relational-algebra/really-make-rator
.
Is object a `rator` record? See [[sqlosure.relational-algebra/really-make-rator]].
(really-make-aggregation op expr)
Construct a aggregation
record.
op
: access via sqlosure.relational-algebra/aggregation-operator
expr
: access via sqlosure.relational-algebra/aggregation-expr
Construct a `aggregation` record. `op`: access via [[sqlosure.relational-algebra/aggregation-operator]] `expr`: access via [[sqlosure.relational-algebra/aggregation-expr]]
(really-make-aggregation-all op)
Construct a aggregation-all
record.
op
: access via sqlosure.relational-algebra/aggregation-all-operator
Construct a `aggregation-all` record. `op`: access via [[sqlosure.relational-algebra/aggregation-all-operator]]
(really-make-application rator rands)
Construct a application
record.
rator
: access via sqlosure.relational-algebra/application-rator
rands
: access via sqlosure.relational-algebra/application-rands
Construct a `application` record. `rator`: access via [[sqlosure.relational-algebra/application-rator]] `rands`: access via [[sqlosure.relational-algebra/application-rands]]
(really-make-base-relation name scheme handle)
Construct a base-relation
record.
name
: access via sqlosure.relational-algebra/base-relation-name
scheme
: access via sqlosure.relational-algebra/base-relation-scheme
handle
: access via sqlosure.relational-algebra/base-relation-handle
Construct a `base-relation` record. `name`: access via [[sqlosure.relational-algebra/base-relation-name]] `scheme`: access via [[sqlosure.relational-algebra/base-relation-scheme]] `handle`: access via [[sqlosure.relational-algebra/base-relation-handle]]
(really-make-combine rel-op query-1 query-2)
Construct a combine
record.
rel-op
: access via sqlosure.relational-algebra/combine-rel-op
query-1
: access via sqlosure.relational-algebra/combine-query-1
query-2
: access via sqlosure.relational-algebra/combine-query-2
Construct a `combine` record. `rel-op`: access via [[sqlosure.relational-algebra/combine-rel-op]] `query-1`: access via [[sqlosure.relational-algebra/combine-query-1]] `query-2`: access via [[sqlosure.relational-algebra/combine-query-2]]
(really-make-distinct-q query)
Construct a DistinctQ
record.
query
: access via sqlosure.relational-algebra/distinct-q-query
Construct a `DistinctQ` record. `query`: access via [[sqlosure.relational-algebra/distinct-q-query]]
(really-make-group columns query)
Construct a group
record.
columns
(set of columns to group by): access via sqlosure.relational-algebra/group-columns
query
(underlying query): access via sqlosure.relational-algebra/group-query
Construct a `group` record. `columns` (set of columns to group by): access via [[sqlosure.relational-algebra/group-columns]] `query` (underlying query): access via [[sqlosure.relational-algebra/group-query]]
(really-make-order alist query)
Construct a order
record.
alist
: access via sqlosure.relational-algebra/order-alist
query
: access via sqlosure.relational-algebra/order-query
Construct a `order` record. `alist`: access via [[sqlosure.relational-algebra/order-alist]] `query`: access via [[sqlosure.relational-algebra/order-query]]
(really-make-rator name range-type-proc proc data)
Construct a rator
record.
name
: access via sqlosure.relational-algebra/rator-name
range-type-proc
: access via sqlosure.relational-algebra/rator-range-type-proc
proc
: access via sqlosure.relational-algebra/rator-proc
data
: access via sqlosure.relational-algebra/rator-data
Construct a `rator` record. `name`: access via [[sqlosure.relational-algebra/rator-name]] `range-type-proc`: access via [[sqlosure.relational-algebra/rator-range-type-proc]] `proc`: access via [[sqlosure.relational-algebra/rator-proc]] `data`: access via [[sqlosure.relational-algebra/rator-data]]
(really-make-rel-scheme-cache fun map-atom)
Construct a RelSchemeCache
(Cache for the relational scheme of a query.) record.
fun
(Function accepting an environment, producing a rel scheme.): access via sqlosure.relational-algebra/rel-scheme-cache-fun
map-atom
(Atom containing map environment |-> scheme
): access via sqlosure.relational-algebra/rel-scheme-cache-map-atom
Construct a `RelSchemeCache` (Cache for the relational scheme of a query.) record. `fun` (Function accepting an environment, producing a rel scheme.): access via [[sqlosure.relational-algebra/rel-scheme-cache-fun]] `map-atom` (Atom containing map `environment |-> scheme`): access via [[sqlosure.relational-algebra/rel-scheme-cache-map-atom]]
(really-make-restrict exp query)
Construct a restrict
record.
exp
: access via sqlosure.relational-algebra/restrict-exp
query
: access via sqlosure.relational-algebra/restrict-query
Construct a `restrict` record. `exp`: access via [[sqlosure.relational-algebra/restrict-exp]] `query`: access via [[sqlosure.relational-algebra/restrict-query]]
(really-make-restrict-outer exp query)
Construct a restrict-outer
(Restrict a left outer product.
This will restrict all the right-hand sides of left outer products.
If it doesn't hold, these right-hand sides will have all-null
columns.) record.
exp
: access via sqlosure.relational-algebra/restrict-outer-exp
query
: access via sqlosure.relational-algebra/restrict-outer-query
Construct a `restrict-outer` (Restrict a left outer product. This will restrict all the right-hand sides of left outer products. If it doesn't hold, these right-hand sides will have all-null columns.) record. `exp`: access via [[sqlosure.relational-algebra/restrict-outer-exp]] `query`: access via [[sqlosure.relational-algebra/restrict-outer-query]]
(really-make-top offset count query)
Construct a top
record.
offset
: access via sqlosure.relational-algebra/top-offset
count
: access via sqlosure.relational-algebra/top-count
query
: access via sqlosure.relational-algebra/top-query
Construct a `top` record. `offset`: access via [[sqlosure.relational-algebra/top-offset]] `count`: access via [[sqlosure.relational-algebra/top-count]] `query`: access via [[sqlosure.relational-algebra/top-query]]
(really-really-make-project alist query)
Construct a project
record.
alist
(Maps newly bound attribute names to expressions.): access via sqlosure.relational-algebra/project-alist
query
: access via sqlosure.relational-algebra/project-query
Construct a `project` record. `alist` (Maps newly bound attribute names to expressions.): access via [[sqlosure.relational-algebra/project-alist]] `query`: access via [[sqlosure.relational-algebra/project-query]]
(rel-scheme->environment s)
Returns the relation table of a rel-scheme.
Returns the relation table of a rel-scheme.
(rel-scheme-cache-fun rec__2313__auto__)
(rel-scheme-cache-fun data__2314__auto__ v__2315__auto__)
Lens for the fun
field (Function accepting an environment, producing a rel scheme.) from a RelSchemeCache
record. See sqlosure.relational-algebra/really-make-rel-scheme-cache
.
Lens for the `fun` field (Function accepting an environment, producing a rel scheme.) from a [[RelSchemeCache]] record. See [[sqlosure.relational-algebra/really-make-rel-scheme-cache]].
(rel-scheme-cache-map-atom rec__2313__auto__)
(rel-scheme-cache-map-atom data__2314__auto__ v__2315__auto__)
Lens for the map-atom
field (Atom containing map environment |-> scheme
) from a RelSchemeCache
record. See sqlosure.relational-algebra/really-make-rel-scheme-cache
.
Lens for the `map-atom` field (Atom containing map `environment |-> scheme`) from a [[RelSchemeCache]] record. See [[sqlosure.relational-algebra/really-make-rel-scheme-cache]].
(rel-scheme-cache-scheme cache env)
Compute a relational scheme from a cache, using the cached version if possible.
Compute a relational scheme from a cache, using the cached version if possible.
(rel-scheme-cache? thing)
Is object a RelSchemeCache
record? See sqlosure.relational-algebra/really-make-rel-scheme-cache
.
Is object a `RelSchemeCache` record? See [[sqlosure.relational-algebra/really-make-rel-scheme-cache]].
(rel-scheme-columns rec__2313__auto__)
(rel-scheme-columns data__2314__auto__ v__2315__auto__)
Lens for the columns
field (Ordered sequence of the columns.) from a [[rel-scheme]] record. See [[sqlosure.relational-algebra/really-make-rel-scheme]].
Lens for the `columns` field (Ordered sequence of the columns.) from a [[rel-scheme]] record. See [[sqlosure.relational-algebra/really-make-rel-scheme]].
(rel-scheme-concat s1 s2)
Takes two rel-schemes and concatenates them. This means:
Takes two rel-schemes and concatenates them. This means: - concatenate columns - merge alists - union grouped-sets
(rel-scheme-difference s1 s2)
Return a new rel-scheme resulting of the (set-)difference of s1's and s2's alist.
Return a new rel-scheme resulting of the (set-)difference of s1's and s2's alist.
(rel-scheme-grouped rec__2313__auto__)
(rel-scheme-grouped data__2314__auto__ v__2315__auto__)
Lens for the grouped
field (nil
or set of grouped column labels) from a [[rel-scheme]] record. See [[sqlosure.relational-algebra/really-make-rel-scheme]].
Lens for the `grouped` field (`nil` or set of grouped column labels) from a [[rel-scheme]] record. See [[sqlosure.relational-algebra/really-make-rel-scheme]].
(rel-scheme-map rec__2313__auto__)
(rel-scheme-map data__2314__auto__ v__2315__auto__)
Lens for the map
field (Map of labels to types.) from a [[rel-scheme]] record. See [[sqlosure.relational-algebra/really-make-rel-scheme]].
Lens for the `map` field (Map of labels to types.) from a [[rel-scheme]] record. See [[sqlosure.relational-algebra/really-make-rel-scheme]].
(rel-scheme-nullable scheme)
Makes all columns in a scheme nullable.
Makes all columns in a scheme nullable.
(rel-scheme-types rs)
Returns the types of a rel-scheme, in the order they were created.
Returns the types of a rel-scheme, in the order they were created.
(rel-scheme-unary=? rs)
Does rel scheme have only 1 column?
Does rel scheme have only 1 column?
(rel-scheme-unary? scheme)
Returns true if the rel-scheme's alist consist of only one pair.
Returns true if the rel-scheme's alist consist of only one pair.
(rel-scheme=? t1 t2)
Returns true if t1 and t2 are the same.
Returns true if t1 and t2 are the same.
(rel-scheme? thing)
Is object a rel-scheme
record? See [[sqlosure.relational-algebra/really-make-rel-scheme]].
Is object a `rel-scheme` record? See [[sqlosure.relational-algebra/really-make-rel-scheme]].
(restrict-exp rec__2313__auto__)
(restrict-exp data__2314__auto__ v__2315__auto__)
Lens for the exp
field from a [[restrict]] record. See sqlosure.relational-algebra/really-make-restrict
.
Lens for the `exp` field from a [[restrict]] record. See [[sqlosure.relational-algebra/really-make-restrict]].
(restrict-outer-exp rec__2313__auto__)
(restrict-outer-exp data__2314__auto__ v__2315__auto__)
Lens for the exp
field from a [[restrict-outer]] record. See sqlosure.relational-algebra/really-make-restrict-outer
.
Lens for the `exp` field from a [[restrict-outer]] record. See [[sqlosure.relational-algebra/really-make-restrict-outer]].
(restrict-outer-query rec__2313__auto__)
(restrict-outer-query data__2314__auto__ v__2315__auto__)
Lens for the query
field from a [[restrict-outer]] record. See sqlosure.relational-algebra/really-make-restrict-outer
.
Lens for the `query` field from a [[restrict-outer]] record. See [[sqlosure.relational-algebra/really-make-restrict-outer]].
(restrict-outer? thing)
Is object a restrict-outer
record? See sqlosure.relational-algebra/really-make-restrict-outer
.
Is object a `restrict-outer` record? See [[sqlosure.relational-algebra/really-make-restrict-outer]].
(restrict-query rec__2313__auto__)
(restrict-query data__2314__auto__ v__2315__auto__)
Lens for the query
field from a [[restrict]] record. See sqlosure.relational-algebra/really-make-restrict
.
Lens for the `query` field from a [[restrict]] record. See [[sqlosure.relational-algebra/really-make-restrict]].
(restrict? thing)
Is object a restrict
record? See sqlosure.relational-algebra/really-make-restrict
.
Is object a `restrict` record? See [[sqlosure.relational-algebra/really-make-restrict]].
(scalar-subquery-query rec__2313__auto__)
(scalar-subquery-query data__2314__auto__ v__2315__auto__)
Lens for the query
field from a [[scalar-subquery]] record. See sqlosure.relational-algebra/make-scalar-subquery
.
Lens for the `query` field from a [[scalar-subquery]] record. See [[sqlosure.relational-algebra/make-scalar-subquery]].
(scalar-subquery? thing)
Is object a scalar-subquery
record? See sqlosure.relational-algebra/make-scalar-subquery
.
Is object a `scalar-subquery` record? See [[sqlosure.relational-algebra/make-scalar-subquery]].
(set-subquery-query rec__2313__auto__)
(set-subquery-query data__2314__auto__ v__2315__auto__)
Lens for the query
field from a [[set-subquery]] record. See sqlosure.relational-algebra/make-set-subquery
.
Lens for the `query` field from a [[set-subquery]] record. See [[sqlosure.relational-algebra/make-set-subquery]].
(set-subquery? thing)
Is object a set-subquery
record? See sqlosure.relational-algebra/make-set-subquery
.
Is object a `set-subquery` record? See [[sqlosure.relational-algebra/make-set-subquery]].
(top-count rec__2313__auto__)
(top-count data__2314__auto__ v__2315__auto__)
Lens for the count
field from a [[top]] record. See sqlosure.relational-algebra/really-make-top
.
Lens for the `count` field from a [[top]] record. See [[sqlosure.relational-algebra/really-make-top]].
(top-offset rec__2313__auto__)
(top-offset data__2314__auto__ v__2315__auto__)
Lens for the offset
field from a [[top]] record. See sqlosure.relational-algebra/really-make-top
.
Lens for the `offset` field from a [[top]] record. See [[sqlosure.relational-algebra/really-make-top]].
(top-query rec__2313__auto__)
(top-query data__2314__auto__ v__2315__auto__)
Lens for the query
field from a [[top]] record. See sqlosure.relational-algebra/really-make-top
.
Lens for the `query` field from a [[top]] record. See [[sqlosure.relational-algebra/really-make-top]].
(top? thing)
Is object a top
record? See sqlosure.relational-algebra/really-make-top
.
Is object a `top` record? See [[sqlosure.relational-algebra/really-make-top]].
(tuple-expressions rec__2313__auto__)
(tuple-expressions data__2314__auto__ v__2315__auto__)
Lens for the expressions
field from a [[tuple]] record. See sqlosure.relational-algebra/make-tuple
.
Lens for the `expressions` field from a [[tuple]] record. See [[sqlosure.relational-algebra/make-tuple]].
(tuple? thing)
Is object a tuple
record? See sqlosure.relational-algebra/make-tuple
.
Is object a `tuple` record? See [[sqlosure.relational-algebra/make-tuple]].
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close