Liking cljdoc? Tell your friends :D

psql.catalog

Schema and catalog introspection over JDBC DatabaseMetaData, returning normalized Clojure data. Each function takes a db spec or datasource (anything next.jdbc/get-connection accepts) and, optionally, a table name.

Table and schema names are accepted as strings or keywords. Results use keyword names so they compose with the rest of psql-clj.

Schema and catalog introspection over JDBC `DatabaseMetaData`, returning
normalized Clojure data. Each function takes a db spec or datasource (anything
`next.jdbc/get-connection` accepts) and, optionally, a table name.

Table and schema names are accepted as strings or keywords. Results use
keyword names so they compose with the rest of psql-clj.
raw docstring

columnsclj

(columns db table)

Return the columns of TABLE as a vector of maps ordered by position: :name, :type (database type name), :sql-type (JDBC int), :size, :nullable?, :default, :position.

Return the columns of TABLE as a vector of maps ordered by position:
`:name`, `:type` (database type name), `:sql-type` (JDBC int), `:size`,
`:nullable?`, `:default`, `:position`.
sourceraw docstring

foreign-keysclj

(foreign-keys db table)

Return the foreign keys declared on TABLE as a vector of maps: :name (constraint name), :column, and :references {:table … :column …}.

Return the foreign keys declared on TABLE as a vector of maps:
`:name` (constraint name), `:column`, and `:references` `{:table … :column …}`.
sourceraw docstring

indexesclj

(indexes db table)

Return the indexes on TABLE as a vector of maps, one per index: :name, :unique?, and :columns (a vector of column-name keywords in index order). The implicit table-statistics row is skipped.

Return the indexes on TABLE as a vector of maps, one per index:
`:name`, `:unique?`, and `:columns` (a vector of column-name keywords in
index order). The implicit table-statistics row is skipped.
sourceraw docstring

primary-keysclj

(primary-keys db table)

Return the primary-key column names of TABLE (as keywords) in key order.

Return the primary-key column names of TABLE (as keywords) in key order.
sourceraw docstring

schemasclj

(schemas db)

Return the set of schema names (as keywords) in the database.

Return the set of schema names (as keywords) in the database.
sourceraw docstring

viewsclj

(views db)

Return the set of view names (as keywords) visible in the database.

Return the set of view names (as keywords) visible in the database.
sourceraw docstring

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