Skip to content

Commit

Permalink
add mariadb
Browse files Browse the repository at this point in the history
  • Loading branch information
ezekg committed Aug 9, 2024
1 parent 789af4d commit 52a9bc6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
ruby: ['3.3', '3.2', '3.1']
database: ['sqlite', 'mysql', 'postgres']
database: ['sqlite', 'mysql', 'postgres', 'mariadb']
services:
mysql:
image: mysql:8.0
Expand All @@ -32,6 +32,13 @@ jobs:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
mariadb:
image: 'mariadb:11'
env:
MARIADB_ROOT_PASSWORD: root
MARIADB_DATABASE: test
ports:
- 3306:3306
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -47,10 +54,13 @@ jobs:
echo "DATABASE_URL=sqlite3::memory:" >> $GITHUB_ENV
;;
mysql)
echo "DATABASE_URL=mysql://root:root@localhost/test" >> $GITHUB_ENV
echo "DATABASE_URL=mysql://root:root@localhost:3306/test" >> $GITHUB_ENV
;;
postgres)
echo "DATABASE_URL=postgres://postgres:postgres@localhost/test" >> $GITHUB_ENV
echo "DATABASE_URL=postgres://postgres:postgres@localhost:5432/test" >> $GITHUB_ENV
;;
mariadb)
echo "DATABASE_URL=mariadb://root:root@localhost:3306/test" >> $GITHUB_ENV
;;
esac
- name: Test
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Use `union_of` to create unions of other associations in Active Record, using a
SQL `UNION` under the hood. `union_of` has full support for joins, preloading,
and eager loading of union associations.

We currently support PostgreSQL and MySQL. We'd love contributions that add
SQLite support, but we probably won't add it ourselves.
We currently support PostgreSQL, MySQL, and MariaDB. We'd love contributions
that add SQLite support, but we probably won't add it ourselves.

This gem was extracted from [Keygen](https://keygen.sh) and is being used in
production to serve millions of API requests per day.
Expand Down Expand Up @@ -99,9 +99,9 @@ your tables are indexed well. We have tried to make the underlying `UNION`
queries as efficient as possible, but please open an issue or PR if you are
encountering a performance issue that is caused by this gem.

We use Postgres in production, but we do not actively use MySQL so there may be
performance issues we are unaware of. If you stumble upon issues, please open
an issue or a PR.
We use Postgres in production, but we do not actively use MySQL or MariaDB, so
there may be performance issues we are unaware of. If you stumble upon issues,
please open an issue or a PR.

## Supported Rubies

Expand Down

0 comments on commit 52a9bc6

Please sign in to comment.