databases
databases copied to clipboard
Async database support for Python. 🗄
The problem is in accessing attributes after tables join. So my models are next: ``` class Itinerary(Base): __tablename__ = 'itineraries' id = Column(Integer, primary_key=True) name = Column(String(128)) bus_id = Column(Integer,...
Question: how to set a custom json_serializer? I have to store a datetime data in JSONB column, so I have to override json_serializer to take care of it. Is there...
Connection strings that specified `mysql:///db?unix_socket=...` option were not passing the `unix_socket` option to the underlying aiomysql connection. This meant that it was not possible to connect via UNIX domain socket...
Now that `databases` `URL` has a `unix_sock` param, use it for mysql connections. See also the older #239.
Hi, first of all thank you for this project . i really appreciate it. problem : am trying to figure out how to update or delete rows in a table...
This fixes the following case: ```python from databases import Database import asyncio async def method(): database = Database("postgresql://...") await database.connect() try: async with database.connection() as connection: await connection.execute( """ CREATE...
databases:0.5.5 I am using Postgres, and trying to change search_path. ``` import asyncio async def method(): await database.connect() await database.execute(query="SET search_path TO my_schema, public;") path = await database.execute(query="show search_path;") print(path)...
If no explicit colum info is present, the postgres Record class causes a KeyError. Besides the given example in encode/databases#190 this also happens if you construct the queries from text-clauses....
Is there a (much!) better way to achieve the following? (Note the hack at the bottom of the snippet) ``` def json_loads(v): return json.loads(v) def serialize_unknown_types(v): if isinstance(v, Decimal): return...