6 Commits
Author SHA1 Message Date
dsql 2e837da7df fix: close() nulls _pool + connect() lock (psql-7/8 twin), % in identifiers, doc caveats
close() now nulls self._pool so a closed instance reports not-connected instead of
masquerading as live (twin of psql-7); connect() is guarded by an internal asyncio.Lock
so concurrent connect() calls serialize instead of racing to create and orphan multiple
live pools (twin of psql-8). _quote_ident now escapes a literal % in identifiers (mysql-7:
PyMySQL's query % args substitution otherwise breaks any Layer-1 call against a %-bearing
table/column name). fetchval/exists tolerate a caller-overridden tuple cursorclass via a
new _first_value helper (mysql-8). Documents the %%-escaping rule for literal % in raw SQL
text (mysql-6) and the upsert() VALUES() deprecation on MySQL 8.0.20+ (mysql-9).

Signed-off-by: disqualifier <dev@disqualifier.me>
v0.1.4
2026-07-02 23:32:53 -04:00
dsql 50388de22c fix: reject autocommit=False override and IS NULL condition handling
_where() rendered None conditions as col = %s bound to NULL, which sql
never matches, so get/get_one/exists/delete silently missed NULL rows
despite insert() writing NULL fine — fixed to emit col IS NULL, in
lockstep with the psql lib's identical fix.

Separately, __init__ now rejects autocommit=False in pool_kwargs: with
it, _run/_fetchall never commit, so on pool release aiomysql closes the
in-transaction connection and MySQL rolls back server-side while
insert()/delete()/upsert()/execute() still return success signals
(lastrowid/rowcount) for writes that were silently discarded.

Signed-off-by: disqualifier <dev@disqualifier.me>
v0.1.3
2026-07-02 16:44:34 -04:00
dsql a46c4b13fc fix: connect() orphan (lockstep psql-3) + await pool.release() (mysql-1)
- connect() closes an existing pool on re-connect and tears down the built pool on SELECT-1
  validation failure (sibling of psql-3).
- _Transaction now awaits pool.release() in both __aexit__ and the __aenter__ failure path,
  matching psql and aiomysql's idiom (no un-awaited _wakeup task per transaction).
- README: insert-returns-lastrowid headline precision + upsert-rowcount convention note.
verified vs real MariaDB (re-connect, 5-tx release, full suite). bump v0.1.1 -> v0.1.2

Signed-off-by: disqualifier <dev@disqualifier.me>
v0.1.2
2026-07-01 00:28:27 -04:00
dsql 2372b1ecd1 fix: transaction() releases the pooled connection when begin() fails (lockstep w/ psql-1)
same acquire-then-fail leak as psql: begin() failing after acquire leaked the conn. release
on failure. verified against MariaDB: 6 forced begin-failures no longer drain the pool.
bump v0.1.0 -> v0.1.1

Signed-off-by: disqualifier <dev@disqualifier.me>
v0.1.1
2026-06-30 21:04:43 -04:00
dsql 9034ce32c2 add package: pyproject + src (layer-1 identical to psql, raw layer-2, fail-loud, dict rows)
Signed-off-by: disqualifier <dev@disqualifier.me>
v0.1.0
2026-06-30 20:12:40 -04:00
dsql 9beeee4d9f init: async mysql/mariadb wrapper over aiomysql (two-layer API, class MysqlDB)
Signed-off-by: disqualifier <dev@disqualifier.me>
2026-06-30 20:12:40 -04:00