Skip to content

Commit 596518a

Browse files
authored
Merge pull request #194 from Maxteabag/worktree-mariadb-pymysql-switch
Switch MariaDB driver to PyMySQL
2 parents 0ffff38 + 5fed31d commit 596518a

12 files changed

Lines changed: 652 additions & 250 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ Most of the time you can just run `sqlit` and connect. If a Python driver is mis
278278
| PostgreSQL / CockroachDB / Supabase | `psycopg2-binary` | `pipx inject sqlit-tui psycopg2-binary` | `python -m pip install psycopg2-binary` |
279279
| SQL Server | `mssql-python` | `pipx inject sqlit-tui mssql-python` | `python -m pip install mssql-python` |
280280
| MySQL | `PyMySQL` | `pipx inject sqlit-tui PyMySQL` | `python -m pip install PyMySQL` |
281-
| MariaDB | `mariadb` | `pipx inject sqlit-tui mariadb` | `python -m pip install mariadb` |
281+
| MariaDB | `PyMySQL` | `pipx inject sqlit-tui PyMySQL` | `python -m pip install PyMySQL` |
282282
| Oracle | `oracledb` | `pipx inject sqlit-tui oracledb` | `python -m pip install oracledb` |
283283
| DuckDB | `duckdb` | `pipx inject sqlit-tui duckdb` | `python -m pip install duckdb` |
284284
| ClickHouse | `clickhouse-connect` | `pipx inject sqlit-tui clickhouse-connect` | `python -m pip install clickhouse-connect` |

aur/.SRCINFO

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ pkgbase = sqlit
1717
depends = python-docker
1818
optdepends = python-psycopg2: PostgreSQL, CockroachDB and Supabase support
1919
optdepends = python-pyodbc: SQL Server support
20-
optdepends = python-pymysql: MySQL support
21-
optdepends = python-mariadb-connector: MariaDB support
20+
optdepends = python-pymysql: MySQL and MariaDB support
2221
optdepends = python-oracledb: Oracle support
2322
optdepends = python-duckdb: DuckDB support
2423
optdepends = python-clickhouse-connect: ClickHouse support

aur/PKGBUILD

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ depends=(
2020
optdepends=(
2121
'python-psycopg2: PostgreSQL, CockroachDB and Supabase support'
2222
'python-pyodbc: SQL Server support'
23-
'python-pymysql: MySQL support'
24-
'python-mariadb-connector: MariaDB support'
23+
'python-pymysql: MySQL and MariaDB support'
2524
'python-oracledb: Oracle support'
2625
'python-duckdb: DuckDB support'
2726
'python-clickhouse-connect: ClickHouse support'

infra/docker/docker-compose.test.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,48 @@ services:
289289
tmpfs:
290290
- /var/lib/mysql
291291

292+
# MariaDB with TIS-620 charset (Thai) - for charset testing
293+
mariadb-tis620:
294+
image: mariadb:11
295+
container_name: sqlit-test-mariadb-tis620
296+
command: --character-set-server=tis620 --collation-server=tis620_thai_ci
297+
environment:
298+
MARIADB_ROOT_PASSWORD: "TestPassword123!"
299+
MARIADB_USER: "testuser"
300+
MARIADB_PASSWORD: "TestPassword123!"
301+
MARIADB_DATABASE: "test_sqlit"
302+
ports:
303+
- "${MARIADB_TIS620_PORT:-3310}:3306"
304+
healthcheck:
305+
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
306+
interval: 5s
307+
timeout: 5s
308+
retries: 10
309+
start_period: 30s
310+
tmpfs:
311+
- /var/lib/mysql
312+
313+
# MariaDB with Latin1 charset - for charset testing
314+
mariadb-latin1:
315+
image: mariadb:11
316+
container_name: sqlit-test-mariadb-latin1
317+
command: --character-set-server=latin1 --collation-server=latin1_swedish_ci
318+
environment:
319+
MARIADB_ROOT_PASSWORD: "TestPassword123!"
320+
MARIADB_USER: "testuser"
321+
MARIADB_PASSWORD: "TestPassword123!"
322+
MARIADB_DATABASE: "test_sqlit"
323+
ports:
324+
- "${MARIADB_LATIN1_PORT:-3311}:3306"
325+
healthcheck:
326+
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
327+
interval: 5s
328+
timeout: 5s
329+
retries: 10
330+
start_period: 30s
331+
tmpfs:
332+
- /var/lib/mysql
333+
292334
cockroachdb:
293335
image: cockroachdb/cockroach:latest
294336
container_name: sqlit-test-cockroachdb

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ all = [
4040
"psycopg2-binary>=2.9.0",
4141
"mssql-python>=1.1.0",
4242
"PyMySQL>=1.1.0",
43-
"mariadb>=1.1.0",
4443
"oracledb>=2.0.0",
4544
"ibm_db>=3.2.0",
4645
"hdbcli>=2.20.0",
@@ -68,7 +67,7 @@ postgres = ["psycopg2-binary>=2.9.0"]
6867
cockroachdb = ["psycopg2-binary>=2.9.0"]
6968
mssql = ["mssql-python>=1.1.0"]
7069
mysql = ["PyMySQL>=1.1.0"]
71-
mariadb = ["mariadb>=1.1.0"]
70+
mariadb = ["PyMySQL>=1.1.0"]
7271
oracle = ["oracledb>=2.0.0"]
7372
db2 = ["ibm_db>=3.2.0"]
7473
hana = ["hdbcli>=2.20.0"]
@@ -225,7 +224,6 @@ namespace_packages = true
225224
[[tool.mypy.overrides]]
226225
module = [
227226
"pymysql",
228-
"mariadb",
229227
"oracledb",
230228
"duckdb",
231229
"clickhouse_connect",

sqlit/domains/connections/app/install_strategy.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ def _get_arch_package_name(package_name: str) -> str | None:
8080
"mssql-python": "python-mssql",
8181
"PyMySQL": "python-pymysql",
8282
"mysql-connector-python": "python-mysql-connector",
83-
"mariadb": "python-mariadb-connector",
8483
"oracledb": "python-oracledb",
8584
"duckdb": "python-duckdb",
8685
"clickhouse-connect": "python-clickhouse-connect",

0 commit comments

Comments
 (0)