(embedded-record? r)
Check if r
is a valid OrientDB embedded record. eg:
{:_class "User" :name "Test"}
Check if `r` is a valid OrientDB embedded record. eg: {:_class "User" :name "Test"}
(first-elem record-map offset)
Determine the structure of the first element of record-map
.
Determine the structure of the first element of `record-map`.
(get-structure record-map)
Transform the record record-map
into a custom structure. eg.:
(get-structure {:_class "User" :name "Test"}) => [{:key-type 7, :field-name :_class, :position 0, :type 7, :value "User"} {:key-type 7, :field-name :name, :position 0, :type 7, :value "Test"}]
Transform the record `record-map` into a custom structure. eg.: (get-structure {:_class "User" :name "Test"}) => [{:key-type 7, :field-name :_class, :position 0, :type 7, :value "User"} {:key-type 7, :field-name :name, :position 0, :type 7, :value "Test"}]
(get-type v)
Return a keyword the identifies the type of v.
e.g.
(get-type true) => :boolean-type
Return a keyword the identifies the type of `v.` e.g. (get-type true) => :boolean-type
(header-size headers fixed-header-int)
Calculate the total headers
size. fixed-header-int
is needed to
distinguish the calculation of the header size of a record from that of an
embedded map.
Calculate the total `headers` size. `fixed-header-int` is needed to distinguish the calculation of the header size of a record from that of an embedded map.
(link-list? l)
Check if l
is a valid OrienDB link list. e.g.: ["#21:1" "#21:2"]
Check if `l` is a valid OrienDB link list. e.g.: ["#21:1" "#21:2"]
(link-map? m)
Check if m
is a valid OrientDB link map. e.g.: {"test" "#21:2"}
Check if `m` is a valid OrientDB link map. e.g.: {"test" "#21:2"}
(link-set? s)
Check if s
is a valid OrientDB link set. e.g.: #{"#21:1" "#21:2"}
Check if `s` is a valid OrientDB link set. e.g.: #{"#21:1" "#21:2"}
(link? v)
Check if v
is a valid OrientDB link. e.g.: "#21:1"
Check if `v` is a valid OrientDB link. e.g.: "#21:1"
(obinary? v)
Check if v
is an OrientDB binary type.
Check if `v` is an OrientDB binary type.
(oemap->structure data-map offset)
Trasform the embedded map data-map
into a structure. e.g.:
(oemap->structure {:test 1} 0) => ({:key-type 7, :field-name :test, :position [0 0 0 12], :type 1, :value 1, :serialized-value [2]})
Trasform the embedded map `data-map` into a structure. e.g.: (oemap->structure {:test 1} 0) => ({:key-type 7, :field-name :test, :position [0 0 0 12], :type 1, :value 1, :serialized-value [2]})
(oemap-positions structure offset)
Calculate the position of the values in structure
, offsetting the first
value with offset.
Calculate the position of the values in `structure`, offsetting the first value with `offset.`
(oridbag? v)
Check if v
is an OrientDB RidBag embedded type.
Check if `v` is an OrientDB RidBag embedded type.
(oridtree? v)
Check if v
is an OrientDB RidBag tree type.
Check if `v` is an OrientDB RidBag tree type.
(orient-int32 value)
Convert value
in an int32. e.g.: (orient-int32 1) => [0 0 0 1]
Convert `value` in an int32. e.g.: (orient-int32 1) => [0 0 0 1]
Map custom orient types to their respective byte identifier.
Map custom orient types to their respective byte identifier.
(positions->orient-int32 structure)
Convert the positions in structure
in int32.
Convert the positions in `structure` in int32.
(record-map->structure record-map offset)
Transform the record record-map
into a structure. e.g.:
(record-map->structure {:_class "User" :name "Test"} 0) => ({:key-type 7, :field-name :_class, :type 7, :value "User", :serialized-value [8 85 115 101 114], :position [0 0 0 24]} {:key-type 7, :field-name :name, :type 7, :value "Test", :position [0 0 0 29], :serialized-value [8 84 101 115 116]})
Transform the record `record-map` into a structure. e.g.: (record-map->structure {:_class "User" :name "Test"} 0) => ({:key-type 7, :field-name :_class, :type 7, :value "User", :serialized-value [8 85 115 101 114], :position [0 0 0 24]} {:key-type 7, :field-name :name, :type 7, :value "Test", :position [0 0 0 29], :serialized-value [8 84 101 115 116]})
(remove-meta-data v)
Remove from v
the entries whose keyword name starts with "_".
Remove from `v` the entries whose keyword name starts with "_".
(rest-elem record-map first-elem)
Determine the structure of all but the first element of record-map
.
Determine the structure of all but the first element of `record-map`.
Serialize value
based on its type.
It optionally accepts an offset
which will be used to calculate the position
of value
from the beginning of the record.
Serialize `value` based on its type. It optionally accepts an `offset` which will be used to calculate the position of `value` from the beginning of the record.
(serialize-data structure)
Retrieve the :serialized-value inside structure
.
Retrieve the :serialized-value inside `structure`.
(serialize-elements header key-order)
Serialize the elements in header
returning a vector sorted by key-order
.
Serialize the elements in `header` returning a vector sorted by `key-order`.
(serialize-headers structure key-order)
Serialize the elements in structure
returning a sequence sorted by
key-order
.
Serialize the elements in `structure` returning a sequence sorted by `key-order`.
(serialize-key-value k v)
Serialize a key-value according to OrientDB specification. See: http://orientdb.com/docs/last/Record-Schemaless-Binary-Serialization.html#linkmap
Serialize a key-value according to OrientDB specification. See: http://orientdb.com/docs/last/Record-Schemaless-Binary-Serialization.html#linkmap
(serialize-list-item value)
Serialize value
in a vector of bytes with the byte representing its type
coming first. e.g.:
(serialize-list-item true) => [0 1]
Serialize `value` in a vector of bytes with the byte representing its type coming first. e.g.: (serialize-list-item true) => [0 1]
(serialize-structure-values structure)
Serialize the values inside structure
according to their type.
Serialize the values inside `structure` according to their type.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close