LSST Applications g180d380827+107df2c2fa,g2079a07aa2+86d27d4dc4,g2305ad1205+27ad5d03fa,g2bbee38e9b+c6a8a0fb72,g337abbeb29+c6a8a0fb72,g33d1c0ed96+c6a8a0fb72,g3a166c0a6a+c6a8a0fb72,g3d1719c13e+cc4c7597ef,g487adcacf7+4b0be3ae0a,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+14d443d837,g62aa8f1a4b+588cc723a1,g674612935b+7a21c67e12,g858d7b2824+cc4c7597ef,g991b906543+cc4c7597ef,g99cad8db69+b90e8bab37,g9c22b2923f+e2510deafe,g9ddcbc5298+9a081db1e4,g9fbc5161f1+1dc7c5428e,ga1e77700b3+03d07e1c1f,gb0e22166c9+60f28cb32d,gb23b769143+cc4c7597ef,gba4ed39666+c2a2e4ac27,gbb8dafda3b+52e28152d7,gbd998247f1+585e252eca,gbeadb96d05+a322446fe6,gc120e1dc64+6a70fcc921,gc28159a63d+c6a8a0fb72,gc3e9b769f7+48c1343504,gcf0d15dbbd+7a21c67e12,gdaeeff99f8+f9a426f77a,ge6526c86ff+9349653ccd,ge79ae78c31+c6a8a0fb72,gee10cc3b42+585e252eca,w.2024.18
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
lsst.dax.apdb.sql.apdbSql.ApdbSqlConfig Class Reference
Inheritance diagram for lsst.dax.apdb.sql.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 110 of file apdbSql.py.

Member Function Documentation

◆ validate()

None lsst.dax.apdb.sql.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 173 of file apdbSql.py.

173 def validate(self) -> None:
174 super().validate()
175 if len(self.ra_dec_columns) != 2:
176 raise ValueError("ra_dec_columns must have exactly two column names")
177
178

Member Data Documentation

◆ connection_pool

lsst.dax.apdb.sql.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 129 of file apdbSql.py.

◆ connection_timeout

lsst.dax.apdb.sql.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 133 of file apdbSql.py.

◆ db_url

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

Definition at line 113 of file apdbSql.py.

◆ dia_object_columns

lsst.dax.apdb.sql.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 157 of file apdbSql.py.

◆ dia_object_index

lsst.dax.apdb.sql.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 142 of file apdbSql.py.

◆ htm_index_column

lsst.dax.apdb.sql.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 153 of file apdbSql.py.

◆ htm_level

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

Definition at line 151 of file apdbSql.py.

◆ htm_max_ranges

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

Definition at line 152 of file apdbSql.py.

◆ isolation_level

lsst.dax.apdb.sql.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 114 of file apdbSql.py.

◆ namespace

lsst.dax.apdb.sql.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 161 of file apdbSql.py.

◆ prefix

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

Definition at line 160 of file apdbSql.py.

◆ ra_dec_columns

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

Definition at line 156 of file apdbSql.py.

◆ sql_echo

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

Definition at line 141 of file apdbSql.py.

◆ timer

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

Definition at line 171 of file apdbSql.py.


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