Liking cljdoc? Tell your friends :D

clj-odbp.binary.serialize.types


embedded-record?clj

(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"}
sourceraw docstring

first-elemclj

(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`.
sourceraw docstring

get-structureclj

(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"}]
sourceraw docstring

get-typeclj

(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
sourceraw docstring

header-sizeclj

(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.
sourceraw docstring

(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"]
sourceraw docstring

(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"}
sourceraw docstring

(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"}
sourceraw docstring

link?clj

(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"
sourceraw docstring

obinary?clj

(obinary? v)

Check if v is an OrientDB binary type.

Check if `v` is an OrientDB binary type.
sourceraw docstring

oemap->structureclj

(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]})
sourceraw docstring

oemap-positionsclj

(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.`
sourceraw docstring

oridbag?clj

(oridbag? v)

Check if v is an OrientDB RidBag embedded type.

Check if `v` is an OrientDB RidBag embedded type.
sourceraw docstring

oridtree?clj

(oridtree? v)

Check if v is an OrientDB RidBag tree type.

Check if `v` is an OrientDB RidBag tree type.
sourceraw docstring

orient-int32clj

(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]
sourceraw docstring

orient-typesclj

Map custom orient types to their respective byte identifier.

Map custom orient types to their respective byte identifier.
sourceraw docstring

positions->orient-int32clj

(positions->orient-int32 structure)

Convert the positions in structure in int32.

Convert the positions in `structure` in int32.
sourceraw docstring

record-map->structureclj

(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]})
sourceraw docstring

remove-meta-dataclj

(remove-meta-data v)

Remove from v the entries whose keyword name starts with "_".

Remove from `v` the entries whose keyword name starts with "_".
sourceraw docstring

rest-elemclj

(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`.
sourceraw docstring

serializecljmultimethod

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.
sourceraw docstring

serialize-dataclj

(serialize-data structure)

Retrieve the :serialized-value inside structure.

Retrieve the :serialized-value inside `structure`.
sourceraw docstring

serialize-elementsclj

(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`.
sourceraw docstring

serialize-headersclj

(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`.
sourceraw docstring

serialize-key-valueclj

(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
sourceraw docstring

serialize-list-itemclj

(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]
sourceraw docstring

serialize-structure-valuesclj

(serialize-structure-values structure)

Serialize the values inside structure according to their type.

Serialize the values inside `structure` according to their type.
sourceraw docstring

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

× close