Liking cljdoc? Tell your friends :D

active.events.db


add-columnclj

(add-column db-src column f)

When events are added then add the given column to the INSERT statement, and set its value to (f event).

When events are added then add the given column to the INSERT statement, and set its value to `(f event)`.
sourceraw docstring

db-event-sourceclj

(db-event-source db table & [opts])

Defines an event source from a database table.

Options are:

:additional-columns map {column => (fn [event-value] ...) } :where sql fragment like ["x = ?" 42] :order "ASC" (default) or "DESC" :limit sql fragment added to end of select statement. :serialize convert event value to a db parameter (defaults to identity) :deserialize convert event from from a db result (defaults to identity) :auto-time? ignore event time when adding events, assuming the database has a DEFAULT for that column. :value-column, :time-column override defaults ("event" and "time") for the column names :select-options next-jdbc opts for 'plan' :insert-options next-jdbc opts for 'execute-batch'

Defines an event source from a database table.

Options are:

:additional-columns  map {column => (fn [event-value] ...) }
:where  sql fragment like ["x = ?" 42]
:order  "ASC" (default) or "DESC"
:limit  sql fragment added to end of select statement.
:serialize  convert event value to a db parameter (defaults to identity)
:deserialize  convert event from from a db result (defaults to identity)
:auto-time?  ignore event time when adding events, assuming the database has a DEFAULT for that column.
:value-column, :time-column  override defaults ("event" and "time") for the column names
:select-options  next-jdbc opts for 'plan'
:insert-options  next-jdbc opts for 'execute-batch'
sourceraw docstring

edn-json-serialization-optsclj

(edn-json-serialization-opts & [opts])

Returns an option map for db-event-source that can be used to store EDN event values in json columns. Options are passed to clojure.data.json/write-str and read-str.

Returns an option map for [[db-event-source]] that can be used to store EDN event values in json columns.
Options are passed to `clojure.data.json/write-str` and `read-str`.
sourceraw docstring

edn-string-serialization-optsclj

An option map for db-event-source that can be used to store EDN event values in text/varchar columns.

An option map for [[db-event-source]] that can be used to store EDN event values in text/varchar columns.
sourceraw docstring

latest-onlyclj

(latest-only db-src & [limit-expr])

Restrict the given event source to only the latest event.

Restrict the given event source to only the latest event.
sourceraw docstring

restrictclj

(restrict db-src condition)

Restrict the given event source by an additional sql condition.

Restrict the given event source by an additional sql condition.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close