Liking cljdoc? Tell your friends :D

puppetlabs.puppetdb.scf.storage-utils


analyze-small-tablesclj

(analyze-small-tables small-tables)
source

array-to-paramclj

(array-to-param col-type java-type values)
source

ast-path->array-pathclj

(ast-path->array-path path)

Converts integers in path to strings so that the result is suitable for a text[].

Converts integers in path to strings so that the result is suitable
for a text[].
sourceraw docstring

ast-path-type-sigclj

(ast-path-type-sig path)
source

ast-rx-path-type-patternclj

(ast-rx-path-type-pattern path)
source

bytea-escapeclj

(bytea-escape s)
source

constraint-exists?clj

(constraint-exists? table constraint)
(constraint-exists? schema table constraint)

Inputs: ([table :- s/Str constraint :- s/Str] [schema :- s/Str table :- s/Str constraint :- s/Str]) Returns: s/Bool

Inputs: ([table :- s/Str constraint :- s/Str] [schema :- s/Str table :- s/Str constraint :- s/Str])
Returns: s/Bool
sourceraw docstring

current-schemaclj

(current-schema)

Returns the current schema of the database connection on postgres.

Returns the current schema of the database connection on postgres.
sourceraw docstring

db-hash->hexclj

(db-hash->hex pdbb)
source

db-metadataclj

(db-metadata)
source

db-serializeclj

(db-serialize value)

Serialize value into a form appropriate for querying against a serialized database column.

Serialize `value` into a form appropriate for querying against a
serialized database column.
sourceraw docstring

db-up?clj

(db-up? db-spec)
source

fix-identity-sequenceclj

(fix-identity-sequence table column)

Resets a sequence to the maximum value used in a column. Useful when a sequence gets out of sync due to a bug or after a transfer.

Resets a sequence to the maximum value used in a column. Useful when a
sequence gets out of sync due to a bug or after a transfer.
sourceraw docstring

index-exists?clj

(index-exists? index)
(index-exists? index namespace)

Inputs: ([index :- s/Str] [index :- s/Str namespace :- s/Str]) Returns: s/Bool

Returns true if the index exists. Only supported on PostgreSQL currently.

Inputs: ([index :- s/Str] [index :- s/Str namespace :- s/Str])
Returns: s/Bool

Returns true if the index exists. Only supported on PostgreSQL currently.
sourceraw docstring

jsonb-null?clj

(jsonb-null? column null?)

A predicate determining whether the json types of a jsonb column are null.

A predicate determining whether the json types of a jsonb column are null.
sourceraw docstring

jsonb-path-binary-expressionclj

(jsonb-path-binary-expression op column qmarks)

Produce a predicate that compares against nested value with op and checks the existence of a (presumably) top-level value. The existence check is necessary because -> is not indexable (with GIN) but ? is. Assumes a GIN index on the column supplied.

Produce a predicate that compares against nested value with op and checks the
existence of a (presumably) top-level value. The existence check is necessary
because -> is not indexable (with GIN) but ? is. Assumes a GIN index on the
column supplied.
sourceraw docstring

jsonb-scalar-castclj

(jsonb-scalar-cast typ)
source

jsonb-scalar-regexclj

(jsonb-scalar-regex column)

Produce a predicate that matches a regex against a scalar jsonb value

Produce a predicate that matches a regex against a scalar jsonb value 
sourceraw docstring

legacy-sql-regexp-matchclj

(legacy-sql-regexp-match column)

Returns the SQL for performing a regexp match.

Returns the SQL for performing a regexp match.
sourceraw docstring

munge-hash-for-storageclj

(munge-hash-for-storage hash)
source

munge-json-for-storageclj

(munge-json-for-storage value)

Prepare a clojure object for storage depending on db type.

Prepare a clojure object for storage depending on db type.
sourceraw docstring

munge-jsonb-for-storageclj

(munge-jsonb-for-storage value)

Prepare a clojure object for storage. Rewrite all null (\u0000) characters to the replacement character (\ufffd) because Postgres cannot handle them in its JSON values.

Prepare a clojure object for storage.  Rewrite all null (\u0000)
characters to the replacement character (\ufffd) because Postgres
cannot handle them in its JSON values.
sourceraw docstring

munge-uuid-for-storageclj

(munge-uuid-for-storage value)
source

parse-db-jsonclj

(parse-db-json db-json)

Inputs: [db-json :- (s/maybe (s/cond-pre s/Str PGobject))]

Produce a function for parsing an object stored as json.

Inputs: [db-json :- (s/maybe (s/cond-pre s/Str PGobject))]

Produce a function for parsing an object stored as json.
sourceraw docstring

parse-db-uuidclj

(parse-db-uuid db-uuid)
source

path-array-col-matches-any-ast-pathclj

(path-array-col-matches-any-ast-path column sig-col paths)
source

path-array-col-matches-ast-pathclj

(path-array-col-matches-ast-path column sig-col path)
source

path-array-col-matches-rx-vecclj

(path-array-col-matches-rx-vec column sig-col path-rx)
source

pg-extension-mapclj

Maps to the table definition in postgres, but only includes some of the columns:

Table pg_catalog.pg_extension Column | Type | Modifiers ----------------+---------+----------- extname | name | not null extrelocatable | boolean | not null extversion | text |

Maps to the table definition in postgres, but only includes some of the
columns:

  Table pg_catalog.pg_extension
Column     |  Type   | Modifiers
----------------+---------+-----------
extname        | name    | not null
extrelocatable | boolean | not null
extversion     | text    |
sourceraw docstring

pg-extension?clj

(pg-extension? extension)

Inputs: [extension :- s/Str] Returns: s/Bool

Returns true if the named PostgreSQL extension is installed.

Inputs: [extension :- s/Str]
Returns: s/Bool

Returns true if the named PostgreSQL extension is installed.
sourceraw docstring

pg-installed-extensionsclj

(pg-installed-extensions)

Inputs: [] Returns: #:s{Str pg-extension-map}

Obtain the extensions installed and metadata about each extension for the current database.

Inputs: []
Returns: #:s{Str pg-extension-map}

Obtain the extensions installed and metadata about each extension for
 the current database.
sourceraw docstring

sql-array-query-stringclj

(sql-array-query-string column)

Returns an SQL fragment representing a query for a single value being found in an array column in the database.

(str "SELECT ... WHERE " (sql-array-query-string "column_name"))

The returned SQL fragment will contain one parameter placeholder, which must be supplied as the value to be matched.

Returns an SQL fragment representing a query for a single value
being found in an array column in the database.

  (str "SELECT ... WHERE " (sql-array-query-string "column_name"))

The returned SQL fragment will contain *one* parameter placeholder,
which must be supplied as the value to be matched.
sourceraw docstring

sql-array-type-stringclj

(sql-array-type-string basetype)

Returns the SQL to declare an array of the supplied base database type.

Returns the SQL to declare an array of the supplied base database
type.
sourceraw docstring

sql-as-numericclj

(sql-as-numeric column)

Returns the SQL for converting the given column to a number, or to NULL if it is not numeric.

Returns the SQL for converting the given column to a number, or to
NULL if it is not numeric.
sourceraw docstring

sql-castclj

(sql-cast type)
source

sql-current-connection-aggregate-namesclj

(sql-current-connection-aggregate-names)

Returns the names of all of the functions in the public schema of the current connection's database. This is most useful for debugging / testing purposes to allow introspection on the database. (Some of our unit tests rely on this.).

Returns the names of all of the functions in the public schema of
the current connection's database.  This is most useful for
debugging / testing purposes to allow introspection on the
database.  (Some of our unit tests rely on this.).
sourceraw docstring

sql-current-connection-function-namesclj

(sql-current-connection-function-names)

Returns the names of all of the functions in the public schema of the current connection's database. This is most useful for debugging / testing purposes to allow introspection on the database. (Some of our unit tests rely on this.).

Returns the names of all of the functions in the public schema of
the current connection's database.  This is most useful for
debugging / testing purposes to allow introspection on the
database.  (Some of our unit tests rely on this.).
sourceraw docstring

sql-current-connection-sequence-namesclj

(sql-current-connection-sequence-names)

Returns the names of all of the sequences in the public schema of the current connection's database. This is most useful for debugging / testing purposes to allow introspection on the database. (Some of our unit tests rely on this.).

Returns the names of all of the sequences in the public schema of
the current connection's database.  This is most useful for
debugging / testing purposes to allow introspection on the
database.  (Some of our unit tests rely on this.).
sourceraw docstring

sql-current-connection-table-namesclj

(sql-current-connection-table-names)

Returns the names of all of the tables in the public schema of the current connection's database. This is most useful for debugging / testing purposes to allow introspection on the database. (Some of our unit tests rely on this.).

Returns the names of all of the tables in the public schema of the
current connection's database.  This is most useful for debugging /
testing purposes to allow introspection on the database.  (Some of
our unit tests rely on this.).
sourceraw docstring

sql-hash-as-strclj

(sql-hash-as-str column)
source

sql-in-arrayclj

(sql-in-array column value)
source

sql-regexp-array-match-strclj

(sql-regexp-array-match-str column)

Returns SQL for performing a regexp match against the contents of an array. If any of the array's items match the supplied regexp, then that satisfies the match.

Returns SQL for performing a regexp match against the contents of
an array. If any of the array's items match the supplied regexp,
then that satisfies the match.
sourceraw docstring

sql-regexp-array-match-v2clj

(sql-regexp-array-match-v2 column)

Returns SQL for performing a regexp match against the contents of an array. If any of the array's items match the supplied regexp, then that satisfies the match.

Returns SQL for performing a regexp match against the contents of
an array. If any of the array's items match the supplied regexp,
then that satisfies the match.
sourceraw docstring

sql-regexp-matchclj

(sql-regexp-match column)

Returns db code for performing a regexp match.

Returns db code for performing a regexp match.
sourceraw docstring

str->pgobjectclj

(str->pgobject type value)

Inputs: [type :- s/Str value] Returns: PGobject

Inputs: [type :- s/Str value]
Returns: PGobject
sourceraw docstring

to-jdbc-varchar-arrayclj

(to-jdbc-varchar-array coll)

Takes the supplied collection and transforms it into a JDBC-appropriate VARCHAR array.

Takes the supplied collection and transforms it into a
JDBC-appropriate VARCHAR array.
sourceraw docstring

vacuum-analyzeclj

(vacuum-analyze db)
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close