The following are some of the statements used to configure run-time in SQLAlchemy:
create_engine() - This statement creates an instance of the Engine class that connects to a specific database.
Session() - This statement creates an instance of the Session class that handles database transactions.
bind_mapper() - This statement associates a mapper with a database table or view.
create_all() - This statement creates all the tables and indexes defined by the ORM models.
drop_all() - This statement drops all the tables and indexes defined by the ORM models.
scoped_session() - This statement creates a thread-local session that can be used in a multi-threaded environment.
engine.url - This statement accesses the URL object of the Engine instance, which contains the connection parameters for the database.
sessionmaker() - This statement creates a factory function that returns a new Session instance with a given configuration.
Asked: 2023-05-22 18:35:28 +0000
Seen: 12 times
Last updated: May 22 '23