Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement SQLx interface #170

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
a317180
added vendor
halvardssm Apr 8, 2024
6ff309f
Updated vendor
halvardssm Apr 8, 2024
22dc36e
added deno.json
halvardssm Apr 8, 2024
139cab5
removed old config files
halvardssm Apr 8, 2024
083230d
added docker compose
halvardssm Apr 8, 2024
2ceb6d6
updated dependencies to use jsr
halvardssm Apr 8, 2024
cb8d50e
removed vendor and copied over files instead
halvardssm Apr 10, 2024
6962c5c
renamed src folder to lib
halvardssm Apr 12, 2024
5d7bf6a
added fmt and added module name and version to util
halvardssm Apr 12, 2024
e8c497a
updated logger
halvardssm Apr 12, 2024
df0d4b1
updated packet classes
halvardssm Apr 12, 2024
3d35555
Added new connection
halvardssm Apr 12, 2024
f51ff9b
added logger
halvardssm Apr 14, 2024
0329304
added encryptWithPublicKey
halvardssm Apr 14, 2024
2f74b3e
cleaned up packet
halvardssm Apr 14, 2024
9a32a53
refactored auth plugins
halvardssm Apr 14, 2024
a150f6a
Refactored export of ServerCapabilities
halvardssm Apr 14, 2024
2b2ebf3
Refactored errors
halvardssm Apr 14, 2024
d005bf4
Refactored consts, added parameter type, and added doc
halvardssm Apr 14, 2024
88ca324
Moved and renamed auth helper
halvardssm Apr 14, 2024
5a6297f
Refactored code location and names
halvardssm Apr 14, 2024
51c26f1
Refactored tests
halvardssm Apr 14, 2024
62225bd
fmt
halvardssm Apr 14, 2024
4ce8069
Refactored client and improved connection
halvardssm Apr 15, 2024
7d5841d
added pool support
halvardssm Apr 15, 2024
64a7d2f
implemented SQLx interface
halvardssm Apr 21, 2024
1dfba2b
Added types to parameter type
halvardssm Apr 21, 2024
52112b9
cleanup and fixes
halvardssm Apr 21, 2024
d1101ef
Updated interfaces acording to sqlx
halvardssm Apr 24, 2024
4851fc8
Updated CI
halvardssm Apr 24, 2024
3958a44
bump sqlx
halvardssm Apr 24, 2024
4b6be5c
updated ci
halvardssm Apr 24, 2024
20b2a54
bump sqlx
halvardssm Apr 28, 2024
2980d63
Cleanup hexdump
halvardssm Apr 28, 2024
4b475f4
cleanup pool
halvardssm Apr 28, 2024
fe9e363
Fixed test due to sort
halvardssm Apr 28, 2024
c499637
updated to reflect @stdext/sql
halvardssm Jun 26, 2024
13199dc
Updated readme
halvardssm Jun 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 51 additions & 56 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,64 @@
name: ci

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
branches:
- master

env:
DENO_VERSION: vx.x.x

jobs:
fmt:
check:
name: Check format and lint
runs-on: ubuntu-latest

steps:
- name: Clone repo
uses: actions/checkout@v4

- name: Install deno
uses: denoland/setup-deno@v1
with:
deno-version: ${{env.DENO_VERSION}}

- name: Check
run: deno task check

tests:
name: Run tests
runs-on: ubuntu-latest
continue-on-error: true

steps:
- uses: actions/checkout@v1
- name: Install Deno 1.x
- name: Clone repo
uses: actions/checkout@v4

- name: Install deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Check fmt
run: deno fmt --check
test:
deno-version: ${{env.DENO_VERSION}}

- name: Test
run: deno task test:ga

publish:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
DENO_VERSION:
- v1.x
DB_VERSION:
- mysql:5.5
- mysql:5.6
- mysql:5.7
- mysql:8
- mysql:latest
- mariadb:5.5
- mariadb:10.0
- mariadb:10.1
- mariadb:10.2
- mariadb:10.3
- mariadb:10.4
# - mariadb:latest

permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v1
- name: Install Deno ${{ matrix.DENO_VERSION }}
- name: Checkout
uses: actions/checkout@v4

- name: Install deno
uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.DENO_VERSION }}
- name: Show Deno version
run: deno --version
- name: Start ${{ matrix.DB_VERSION }}
run: |
sudo mkdir -p /var/run/mysqld/tmp
sudo chmod -R 777 /var/run/mysqld
docker container run --name mysql --rm -d -p 3306:3306 \
-v /var/run/mysqld:/var/run/mysqld \
-v /var/run/mysqld/tmp:/tmp \
-e MYSQL_ROOT_PASSWORD=root \
${{ matrix.DB_VERSION }}
./.github/workflows/wait-for-mysql.sh
- name: Run tests (TCP)
run: |
deno test --allow-env --allow-net=127.0.0.1:3306 ./test.ts
- name: Run tests (--unstable) (UNIX domain socket)
run: |
SOCKPATH=/var/run/mysqld/mysqld.sock
if [[ "${{ matrix.DB_VERSION }}" == "mysql:5.5" ]]; then
SOCKPATH=/var/run/mysqld/tmp/mysql.sock
fi
echo "DROP USER 'root'@'localhost';" | docker exec -i mysql mysql -proot
DB_SOCKPATH=$SOCKPATH TEST_METHODS=unix \
deno test --unstable --allow-env \
--allow-read=/var/run/mysqld/ --allow-write=/var/run/mysqld/ \
./test.ts
deno-version: ${{env.DENO_VERSION}}

- name: Publish (dry run)
run: deno publish --dry-run
23 changes: 0 additions & 23 deletions .github/workflows/publish-to-nest.land.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish

on:
release:
types: [published]

env:
DENO_VERSION: vx.x.x

jobs:
publish:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Deno
uses: denoland/setup-deno@v1
with:
deno-version: ${{env.DENO_VERSION}}

- name: Publish
if: github.event_name == 'release'
run: deno publish
11 changes: 0 additions & 11 deletions .github/workflows/wait-for-mysql.sh

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ mysql.log
docs
.DS_Store
.idea

dbtmp
tmp_test
Loading