LSST Applications g0265f82a02+d6b5cd48b5,g02d81e74bb+80768bd682,g04242d3e92+8eaa23c173,g06b2ea86fd+734f9505a2,g2079a07aa2+14824f138e,g212a7c68fe+5f4fc2ea00,g2305ad1205+293ab1327e,g2bbee38e9b+d6b5cd48b5,g337abbeb29+d6b5cd48b5,g3ddfee87b4+8eaa23c173,g487adcacf7+abec5a19c5,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+97ef3b4495,g5a732f18d5+66d966b544,g5d7b63bc56+636c3c3fd8,g64a986408d+80768bd682,g858d7b2824+80768bd682,g8a8a8dda67+a6fc98d2e7,g99cad8db69+6282a5f541,g9ddcbc5298+d4bad12328,ga1e77700b3+246acaaf9c,ga8c6da7877+9e3c062e8e,gb0e22166c9+3863383f4c,gb6a65358fc+d6b5cd48b5,gba4ed39666+9664299f35,gbb8dafda3b+60f904e7bc,gc120e1dc64+1bf26d0180,gc28159a63d+d6b5cd48b5,gcf0d15dbbd+8eaa23c173,gd2a12a3803+f8351bc914,gdaeeff99f8+a38ce5ea23,ge79ae78c31+d6b5cd48b5,gee10cc3b42+a6fc98d2e7,gf1cff7945b+80768bd682,v24.1.5.rc1
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
lsst.dax.apdb.apdbSql.ApdbSqlConfig Class Reference
Inheritance diagram for lsst.dax.apdb.apdbSql.ApdbSqlConfig:
lsst.dax.apdb.apdb.ApdbConfig lsst.pex.config.config.Config lsst.pex.config.config.ConfigMeta

Public Member Functions

None validate (self)
 

Static Public Attributes

 db_url = Field[str](doc="SQLAlchemy database connection URI")
 
 isolation_level
 
 connection_pool
 
 connection_timeout
 
 sql_echo = Field[bool](doc="If True then pass SQLAlchemy echo option.", default=False)
 
 dia_object_index
 
 htm_level = Field[int](doc="HTM indexing level", default=20)
 
 htm_max_ranges = Field[int](doc="Max number of ranges in HTM envelope", default=64)
 
 htm_index_column
 
 ra_dec_columns = ListField[str](default=["ra", "dec"], doc="Names of ra/dec columns in DiaObject table")
 
 dia_object_columns
 
 prefix = Field[str](doc="Prefix to add to table names and index names", default="")
 
 namespace
 
 timer = Field[bool](doc="If True then print/log timing information", default=False)
 

Detailed Description

APDB configuration class for SQL implementation (ApdbSql).

Definition at line 102 of file apdbSql.py.

Member Function Documentation

◆ validate()

None lsst.dax.apdb.apdbSql.ApdbSqlConfig.validate ( self)
Validate the Config, raising an exception if invalid.

Raises
------
lsst.pex.config.FieldValidationError
    Raised if verification fails.

Notes
-----
The base class implementation performs type checks on all fields by
calling their `~lsst.pex.config.Field.validate` methods.

Complex single-field validation can be defined by deriving new Field
types. For convenience, some derived `lsst.pex.config.Field`-types
(`~lsst.pex.config.ConfigField` and
`~lsst.pex.config.ConfigChoiceField`) are defined in
``lsst.pex.config`` that handle recursing into subconfigs.

Inter-field relationships should only be checked in derived
`~lsst.pex.config.Config` classes after calling this method, and base
validation is complete.

Reimplemented from lsst.pex.config.config.Config.

Definition at line 165 of file apdbSql.py.

165 def validate(self) -> None:
166 super().validate()
167 if len(self.ra_dec_columns) != 2:
168 raise ValueError("ra_dec_columns must have exactly two column names")
169
170

Member Data Documentation

◆ connection_pool

lsst.dax.apdb.apdbSql.ApdbSqlConfig.connection_pool
static
Initial value:
= Field[bool](
doc="If False then disable SQLAlchemy connection pool. Do not use connection pool when forking.",
default=True,
)

Definition at line 121 of file apdbSql.py.

◆ connection_timeout

lsst.dax.apdb.apdbSql.ApdbSqlConfig.connection_timeout
static
Initial value:
= Field[float](
doc=(
"Maximum time to wait time for database lock to be released before exiting. "
"Defaults to sqlalchemy defaults if not set."
),
default=None,
optional=True,
)

Definition at line 125 of file apdbSql.py.

◆ db_url

lsst.dax.apdb.apdbSql.ApdbSqlConfig.db_url = Field[str](doc="SQLAlchemy database connection URI")
static

Definition at line 105 of file apdbSql.py.

◆ dia_object_columns

lsst.dax.apdb.apdbSql.ApdbSqlConfig.dia_object_columns
static
Initial value:
= ListField[str](
doc="List of columns to read from DiaObject, by default read all columns", default=[]
)

Definition at line 149 of file apdbSql.py.

◆ dia_object_index

lsst.dax.apdb.apdbSql.ApdbSqlConfig.dia_object_index
static
Initial value:
= ChoiceField[str](
doc="Indexing mode for DiaObject table",
allowed={
"baseline": "Index defined in baseline schema",
"pix_id_iov": "(pixelId, objectId, iovStart) PK",
"last_object_table": "Separate DiaObjectLast table",
},
default="baseline",
)

Definition at line 134 of file apdbSql.py.

◆ htm_index_column

lsst.dax.apdb.apdbSql.ApdbSqlConfig.htm_index_column
static
Initial value:
= Field[str](
default="pixelId", doc="Name of a HTM index column for DiaObject and DiaSource tables"
)

Definition at line 145 of file apdbSql.py.

◆ htm_level

lsst.dax.apdb.apdbSql.ApdbSqlConfig.htm_level = Field[int](doc="HTM indexing level", default=20)
static

Definition at line 143 of file apdbSql.py.

◆ htm_max_ranges

lsst.dax.apdb.apdbSql.ApdbSqlConfig.htm_max_ranges = Field[int](doc="Max number of ranges in HTM envelope", default=64)
static

Definition at line 144 of file apdbSql.py.

◆ isolation_level

lsst.dax.apdb.apdbSql.ApdbSqlConfig.isolation_level
static
Initial value:
= ChoiceField[str](
doc=(
"Transaction isolation level, if unset then backend-default value "
"is used, except for SQLite backend where we use READ_UNCOMMITTED. "
"Some backends may not support every allowed value."
),
allowed={
"READ_COMMITTED": "Read committed",
"READ_UNCOMMITTED": "Read uncommitted",
"REPEATABLE_READ": "Repeatable read",
"SERIALIZABLE": "Serializable",
},
default=None,
optional=True,
)

Definition at line 106 of file apdbSql.py.

◆ namespace

lsst.dax.apdb.apdbSql.ApdbSqlConfig.namespace
static
Initial value:
= Field[str](
doc=(
"Namespace or schema name for all tables in APDB database. "
"Presently only works for PostgreSQL backend. "
"If schema with this name does not exist it will be created when "
"APDB tables are created."
),
default=None,
optional=True,
)

Definition at line 153 of file apdbSql.py.

◆ prefix

lsst.dax.apdb.apdbSql.ApdbSqlConfig.prefix = Field[str](doc="Prefix to add to table names and index names", default="")
static

Definition at line 152 of file apdbSql.py.

◆ ra_dec_columns

lsst.dax.apdb.apdbSql.ApdbSqlConfig.ra_dec_columns = ListField[str](default=["ra", "dec"], doc="Names of ra/dec columns in DiaObject table")
static

Definition at line 148 of file apdbSql.py.

◆ sql_echo

lsst.dax.apdb.apdbSql.ApdbSqlConfig.sql_echo = Field[bool](doc="If True then pass SQLAlchemy echo option.", default=False)
static

Definition at line 133 of file apdbSql.py.

◆ timer

lsst.dax.apdb.apdbSql.ApdbSqlConfig.timer = Field[bool](doc="If True then print/log timing information", default=False)
static

Definition at line 163 of file apdbSql.py.


The documentation for this class was generated from the following file: