databases
databases copied to clipboard
Async database support for Python. 🗄
I want to autoload metadata from database, but I don't know how to get the engine from databases: ` database = DataBase() await database.connect() meta = MetaData() users = Table('user',...
I think there's a fairly fundamental problem with the way that database connections are managed using `ContextVar`. `Database.connection()` is designed to return a `Connection` object that is unique to an...
Hi, Thank you so much for the great project. I'd like to apply this to use a local simple sqlite3 db file, but want to use memory mapped i/o for...
Hello we use databases lib but I cant' set SSL=true via DSN ``` @functools.lru_cache(maxsize=None) def init_db() -> Database: settings = get_settings() db_dsn = "postgresql://user:pass@db-host:6432/service_name?application_name=service_name&ssl=true" if settings.testing: db = Database(db_dsn, force_rollback=True)...
Hai friends, I am using `sqlalchemy core + databases` for building and executing query in my project.\ My steps to build the query is like ```python from sqlalchemy import *...
In particular: * More examples of queries. * Examples of using JSON field. * Examples with joining tables. * Getting PK of inserted rows. * Properly document return types of...
Hello! My case is about passing **timeout** argument to asyncpg backend (methods acquire, execute, fetch, etc), because it is important in async python applications. For now it absolutely impossible. I...
The [Databases Introduction](https://www.encode.io/databases/) executes a raw SQL query like so: ```python query = """CREATE TABLE HighScores (id INTEGER PRIMARY KEY, name VARCHAR(100), score INTEGER)""" await database.execute(query=query) ``` The next page,...
consider the following: ```sql CREATE TABLE my_table ( id BIGSERIAL, item INTEGER ) ``` ```python query = """ INSERT INTO my_table (item) VALUES (:item) RETURNING id """ values=[{'item':100, 'item':200}] my_ids...
If I use `set names latin1` in query, hava error like: ``` lib/python3.8/site-packages/aiomysql/connection.py in _read_row_from_packet(self, packet) 1227 if data is not None: 1228 if encoding is not None: -> 1229...