Liking cljdoc? Tell your friends :D

datahike.pg.catalog.objects

Persistent PostgreSQL catalog identities for user-defined objects.

PostgreSQL identifies an object by (catalog relation OID, object OID), with an optional sub-object number for columns. Keeping that shape here lets routines, triggers, dependencies, and future catalog work share one transactional identity model instead of inventing per-feature IDs.

Persistent PostgreSQL catalog identities for user-defined objects.

PostgreSQL identifies an object by (catalog relation OID, object OID),
with an optional sub-object number for columns.  Keeping that shape here
lets routines, triggers, dependencies, and future catalog work share one
transactional identity model instead of inventing per-feature IDs.
raw docstring

addressclj

(address class-oid object-oid)
(address class-oid object-oid sub-id)

A PostgreSQL object address. sub-id is zero for the object itself and positive for a sub-object such as a table column.

A PostgreSQL object address.  `sub-id` is zero for the object itself and
positive for a sub-object such as a table column.
sourceraw docstring

address-keyclj

(address-key class-oid object-oid)

Stable structural serialization of a top-level catalog address.

Stable structural serialization of a top-level catalog address.
sourceraw docstring

bump-revision-txclj

(bump-revision-tx db class-oid object-oid)
source

catalog-entityclj

(catalog-entity db)
source

catalog-keyclj

source

catalog-versionclj

source

column-address-keyclj

(column-address-key relation-oid attnum)
source

column-by-attnumclj

(column-by-attnum db relation-oid attnum)
source

column-by-nameclj

(column-by-name db relation-oid name)
source

column-name-keyclj

(column-name-key relation-oid name)
source

columns-by-relationclj

(columns-by-relation db relation-oid)
(columns-by-relation db relation-oid live-only?)

All persisted column subobjects for a relation in attnum order. Dropped tombstones are included unless live-only? is true.

All persisted column subobjects for a relation in attnum order. Dropped
tombstones are included unless `live-only?` is true.
sourceraw docstring

create-columns-txclj

(create-columns-tx relation-oid columns)

Create durable column subobject rows. The relation may be created in the same transaction, so its lookup ref need not resolve in db yet.

Create durable column subobject rows. The relation may be created in the
same transaction, so its lookup ref need not resolve in `db` yet.
sourceraw docstring

create-object-txclj

(create-object-tx db
                  {:keys [class-oid oid kind name namespace-oid owner-oid
                          revision legacy-oid? identity-tail]
                   :or {owner-oid 10 revision 1}})

Build an object-row transaction. Namespace may be nil for cluster-global objects; otherwise it must already exist. The two :db.unique/value keys are the atomic stale-reader guard: Datahike rejects duplicates and cannot upsert/merge them as it would :db.unique/identity.

Build an object-row transaction.  Namespace may be nil for cluster-global
objects; otherwise it must already exist.  The two :db.unique/value keys
are the atomic stale-reader guard: Datahike rejects duplicates and cannot
upsert/merge them as it would :db.unique/identity.
sourceraw docstring

creation-namespaceclj

(creation-namespace db entries user-name)

The first existing explicit search_path entry. The implicit pg_catalog entry used for lookup is deliberately not a creation target.

The first existing explicit search_path entry.  The implicit pg_catalog
entry used for lookup is deliberately not a creation target.
sourceraw docstring

drop-object-txclj

(drop-object-tx db class-oid object-oid)
source

drop-relation-columns-txclj

(drop-relation-columns-tx db relation-oid)
source

first-user-oidclj

source

identity-keyclj

(identity-key class-oid namespace-oid name)
(identity-key class-oid namespace-oid name tail)

Stable structural serialization of a namespace-scoped object identity. tail carries kind-specific identity, notably a routine's argument types.

Stable structural serialization of a namespace-scoped object identity.
`tail` carries kind-specific identity, notably a routine's argument types.
sourceraw docstring

initialization-txclj

(initialization-tx legacy-objects next-oid)
(initialization-tx legacy-objects legacy-columns next-oid)
source

initialize-catalogclj

(initialize-catalog txdb legacy-objects legacy-columns next-oid)

Transaction function for an atomic, idempotent initial migration. legacy-objects must already have deterministic, collision-free OIDs.

Transaction function for an atomic, idempotent initial migration.
`legacy-objects` must already have deterministic, collision-free OIDs.
sourceraw docstring

max-oidclj

source

migrate-v1-to-v2clj

(migrate-v1-to-v2 txdb legacy-columns)

Atomic catalog-v1 upgrade that installs durable column subaddresses.

Atomic catalog-v1 upgrade that installs durable column subaddresses.
sourceraw docstring

migrate-v2-to-v3clj

(migrate-v2-to-v3 txdb tx-data expected-next next-oid)

Atomic address-completeness migration. tx-data contains preplanned generic object and column rows; allocator/version CAS operations make a stale or concurrent plan fail instead of partially merging.

Atomic address-completeness migration. `tx-data` contains preplanned
generic object and column rows; allocator/version CAS operations make a
stale or concurrent plan fail instead of partially merging.
sourceraw docstring

namespace-by-nameclj

(namespace-by-name db name)
source

namespace-by-oidclj

(namespace-by-oid db oid)
source

next-attnumclj

(next-attnum db relation-oid)
source

object-by-addressclj

(object-by-address db class-oid object-oid)
source

object-by-identityclj

(object-by-identity db class-oid namespace-oid name)
(object-by-identity db class-oid namespace-oid name tail)
source

objects-by-kindclj

(objects-by-kind db kind)
source

objects-in-namespaceclj

(objects-in-namespace db namespace-oid)
source

pg-catalog-namespace-oidclj

source

pg-class-oidclj

source

pg-namespace-oidclj

source

pg-proc-oidclj

source

pg-trigger-oidclj

source

pg-type-oidclj

source

public-namespace-oidclj

source

rename-column-txclj

(rename-column-tx db relation-oid attnum new-name new-storage-ident)

Rename a live column without changing its relation-local address or physical Datahike storage ident.

Rename a live column without changing its relation-local address or
physical Datahike storage ident.
sourceraw docstring

rename-object-txclj

(rename-object-tx db class-oid object-oid new-name identity-tail)
source

reserve-user-oid-txclj

(reserve-user-oid-tx db)

Reserve one currently-unused user OID with a CAS operation that the caller must transact together with the object creation. Allocation is therefore rolled back with its DDL and naturally chains against a speculative DB.

Reserve one currently-unused user OID with a CAS operation that the caller
must transact together with the object creation.  Allocation is therefore
rolled back with its DDL and naturally chains against a speculative DB.
sourceraw docstring

reserve-user-oids-txclj

(reserve-user-oids-tx db n)

Reserve n noncolliding OIDs with one allocator CAS. Used when PostgreSQL creates coupled catalog objects, such as a relation and its row type.

Reserve `n` noncolliding OIDs with one allocator CAS. Used when PostgreSQL
creates coupled catalog objects, such as a relation and its row type.
sourceraw docstring

resolve-search-pathclj

(resolve-search-path db entries user-name)

Resolve PostgreSQL search_path entries to existing namespace OIDs. pg_catalog is implicitly searched first unless explicitly positioned. $user contributes a schema only when it exists.

Resolve PostgreSQL search_path entries to existing namespace OIDs.
pg_catalog is implicitly searched first unless explicitly positioned.
`$user` contributes a schema only when it exists.
sourceraw docstring

schemaclj

Datahike schema for the shared user-object catalog. Address and identity keys use strict unique/value semantics: an attempted duplicate must fail, never upsert or merge two independently-created objects.

Datahike schema for the shared user-object catalog.  Address and identity
keys use strict unique/value semantics: an attempted duplicate must fail,
never upsert or merge two independently-created objects.
sourceraw docstring

tombstone-column-txclj

(tombstone-column-tx db relation-oid attnum)

Mark a column address dropped while retaining its attnum. The live name key is released so a later column with the same SQL name receives a fresh address. Revision guarding belongs to the surrounding relation mutation.

Mark a column address dropped while retaining its attnum. The live name
key is released so a later column with the same SQL name receives a fresh
address. Revision guarding belongs to the surrounding relation mutation.
sourceraw docstring

v1-to-v2-txclj

(v1-to-v2-tx legacy-columns)
source

v2-to-v3-txclj

(v2-to-v3-tx tx-data expected-next next-oid)
source

valid-user-oid?clj

(valid-user-oid? oid)

True for an allocatable PostgreSQL user OID. OID is uint32, while values below FirstNormalObjectId belong to PostgreSQL's bootstrap catalogs.

True for an allocatable PostgreSQL user OID. OID is uint32, while values
below FirstNormalObjectId belong to PostgreSQL's bootstrap catalogs.
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