userver: testsuite.databases.pgsql.testsuite_db.AppliedSchemaHashes Class Reference
Loading...
Searching...
No Matches
testsuite.databases.pgsql.testsuite_db.AppliedSchemaHashes Class Reference

Detailed Description

Definition at line 30 of file testsuite_db.py.

Public Member Functions

 __init__ (self, pool.AutocommitConnectionPool pool, connection.PgConnectionInfo base_conninfo)
str|None get_hash (self, str dbname)
 Get hash of schema applied to a database.
 set_hash (self, str dbname, str schema_hash)
 Store in testsuite database and remember locally a hash of schema applied to a database.

Protected Member Functions

dict[str, str] _hash_by_dbname (self)
None _create_schema_table (self)
None _create_db (self)

Protected Attributes

 _pool = pool
 _conninfo = base_conninfo.replace(dbname=TESTSUITE_DB_NAME)

Constructor & Destructor Documentation

◆ __init__()

testsuite.databases.pgsql.testsuite_db.AppliedSchemaHashes.__init__ ( self,
pool.AutocommitConnectionPool pool,
connection.PgConnectionInfo base_conninfo )

Definition at line 31 of file testsuite_db.py.

Member Function Documentation

◆ _create_db()

None testsuite.databases.pgsql.testsuite_db.AppliedSchemaHashes._create_db ( self)
protected

Definition at line 71 of file testsuite_db.py.

◆ _create_schema_table()

None testsuite.databases.pgsql.testsuite_db.AppliedSchemaHashes._create_schema_table ( self)
protected

Definition at line 66 of file testsuite_db.py.

◆ _hash_by_dbname()

dict[str, str] testsuite.databases.pgsql.testsuite_db.AppliedSchemaHashes._hash_by_dbname ( self)
protected

Definition at line 60 of file testsuite_db.py.

◆ get_hash()

str | None testsuite.databases.pgsql.testsuite_db.AppliedSchemaHashes.get_hash ( self,
str dbname )

Get hash of schema applied to a database.

Definition at line 42 of file testsuite_db.py.

◆ set_hash()

testsuite.databases.pgsql.testsuite_db.AppliedSchemaHashes.set_hash ( self,
str dbname,
str schema_hash )

Store in testsuite database and remember locally a hash of schema applied to a database.

Definition at line 46 of file testsuite_db.py.

Member Data Documentation

◆ _conninfo

testsuite.databases.pgsql.testsuite_db.AppliedSchemaHashes._conninfo = base_conninfo.replace(dbname=TESTSUITE_DB_NAME)
protected

Definition at line 37 of file testsuite_db.py.

◆ _pool

testsuite.databases.pgsql.testsuite_db.AppliedSchemaHashes._pool = pool
protected

Definition at line 36 of file testsuite_db.py.


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