add nullability info to Describe

implement nullability check for Postgres as a query on pg_attribute

implement type name fetching for Postgres as part of `describe()`

add nullability for describe() to MySQL

improve errors with unknown result column type IDs in `query!()`

run cargo fmt and fix warnings

improve error when feature gates for chrono/uuid types is not turned on

workflows/rust: add step to UI-test missing optional features

improve error for unsupported/feature-gated input parameter types

fix `PgConnection::get_type_names()` for empty type IDs list

fix `tests::mysql::test_describe()` on MariaDB 10.4

copy-edit unsupported/feature-gated type errors in `query!()`

Postgres: fix SQL type of string array

closes #107
closes #17

Co-Authored-By: Anthony Dodd <Dodd.AnthonyJosiah@gmail.com>
This commit is contained in:
Austin Bonander
2020-01-24 20:24:39 -08:00
committed by Ryan Leckey
parent 59cf900348
commit 4163388298
33 changed files with 654 additions and 64 deletions

View File

@@ -120,6 +120,16 @@ jobs:
env:
DATABASE_URL: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres
# UI feature gate tests: async-std
- run: cargo test --no-default-features --features 'runtime-async-std postgres macros tls'
env:
DATABASE_URL: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres
# UI feature gate tests: tokio
- run: cargo test --no-default-features --features 'runtime-tokio postgres macros tls'
env:
DATABASE_URL: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres
mysql:
needs: build
runs-on: ubuntu-latest
@@ -176,6 +186,21 @@ jobs:
# NOTE: Github Actions' YML parser doesn't handle multiline strings correctly
DATABASE_URL: mysql://root:password@localhost:${{ job.services.mysql.ports[3306] }}/sqlx?ssl-mode=VERIFY_CA&ssl-ca=%2Fdata%2Fmysql%2Fca.pem
# UI feature gate tests: async-std
- run: cargo test --no-default-features --features 'runtime-async-std mysql macros tls' --test ui-tests
env:
# pass the path to the CA that the MySQL service generated
# NOTE: Github Actions' YML parser doesn't handle multiline strings correctly
DATABASE_URL: mysql://root:password@localhost:${{ job.services.mysql.ports[3306] }}/sqlx?ssl-mode=VERIFY_CA&ssl-ca=%2Fdata%2Fmysql%2Fca.pem
# UI feature gate tests: tokio
- run: cargo test --no-default-features --features 'runtime-tokio mysql macros tls' --test ui-tests
env:
# pass the path to the CA that the MySQL service generated
# NOTE: Github Actions' YML parser doesn't handle multiline strings correctly
DATABASE_URL: mysql://root:password@localhost:${{ job.services.mysql.ports[3306] }}/sqlx?ssl-mode=VERIFY_CA&ssl-ca=%2Fdata%2Fmysql%2Fca.pem
mariadb:
needs: build
runs-on: ubuntu-latest
@@ -225,3 +250,13 @@ jobs:
- run: cargo test --no-default-features --features 'runtime-tokio mysql macros uuid chrono tls'
env:
DATABASE_URL: mariadb://root:password@localhost:${{ job.services.mariadb.ports[3306] }}/sqlx
# UI feature gate tests: async-std
- run: cargo test --no-default-features --features 'runtime-async-std mysql macros tls'
env:
DATABASE_URL: mariadb://root:password@localhost:${{ job.services.mariadb.ports[3306] }}/sqlx
# UI feature gate tests: tokio
- run: cargo test --no-default-features --features 'runtime-tokio mysql macros tls'
env:
DATABASE_URL: mariadb://root:password@localhost:${{ job.services.mariadb.ports[3306] }}/sqlx