Ryan Leckey
e42a995fd9
Extract a PgSequenceDecoder from ArrayDecoder and RecordDecoder and improve to support mutual nesting
2020-03-20 19:56:25 -07:00
Ryan Leckey
13997ce957
Change HasSqlType to Type
2020-03-20 19:55:47 -07:00
Ryan Leckey
9973fa6357
Add decode_err! to help with formatted decode error generation
2020-03-20 19:55:00 -07:00
Ryan Leckey
24d62dd464
Add DecodeOwned to help with trait bounds on owned data
2020-03-20 19:54:44 -07:00
Ryan Leckey
f562e919b7
Merge branch '1d-array-pg-support' of https://github.com/oeb25/sqlx into oeb25-1d-array-pg-support
2020-03-20 10:11:02 -07:00
Ryan Leckey
50c3e5fefb
Merge pull request #138 from PoiScript/master
...
postgres: ipnetwork support
2020-03-20 09:54:43 -07:00
Ryan Leckey
a017150890
postgres: tls: accept invalid certificates and mismatched hostnames under "prefer"
2020-03-20 09:47:18 -07:00
PoiScript
fbbae16a74
update decoding and encoding
2020-03-20 11:10:36 +08:00
PoiScript
3014ab4750
fix typo in Cargo.toml
2020-03-20 10:51:47 +08:00
PoiScript
7ab76ba84e
make inet and cidr compatible
2020-03-20 10:19:14 +08:00
PoiScript
c9cca27e65
rename feature gate to ipnetwork
2020-03-20 10:19:14 +08:00
PoiScript
060c5d2b66
postgres: ipnetwork support
2020-03-19 18:21:09 +08:00
Ryan Leckey
9be1512833
mysql: use double literals in test
2020-03-18 23:16:56 -07:00
Ryan Leckey
2a8906d1e5
add more documentation
2020-03-18 22:46:44 -07:00
Ryan Leckey
1fc18460b0
transaction: document, test, and fix operation of nested transactions
2020-03-18 22:46:44 -07:00
Ryan Leckey
829f37793a
Re-export PgRecordEncoder and PgRecordDecoder
2020-03-18 22:11:02 -07:00
Ryan Leckey
5809f8687c
Merge remote-tracking branch 'origin/ab/bigdecimal'
2020-03-18 22:09:27 -07:00
Ryan Leckey
dfb313f0c6
Add Postgres <-> Rust type documentation
2020-03-18 22:08:32 -07:00
Ryan Leckey
cb67ed0300
Make PgTypeInfo::oid doc(hidden)
2020-03-18 22:08:18 -07:00
Austin Bonander
33677e86a8
move PgNumeric[Sign], PgRecord[Encoder,Decoder] to hidden postgres::types::raw
...
fix errors
2020-03-18 19:36:54 -07:00
Austin Bonander
7ffec2fef8
remove .expect()
in impl TryFrom<PgNumeric> for BigDecimal
2020-03-18 19:12:14 -07:00
Austin Bonander
979c5cc944
remove unnecessary comment and update Cargo.lock
2020-03-18 19:09:10 -07:00
Austin Bonander
3a43e939e3
refactor PgNumeric
so NaN can't be misinterpreted, document types
2020-03-18 19:06:14 -07:00
Austin Bonander
b7aabaa0ec
numeric/bigdecimal modules: fix warnings
2020-03-18 19:06:14 -07:00
Austin Bonander
3cb42def3b
macros: add support for Postgres + BigDecimal
2020-03-18 19:06:14 -07:00
Austin Bonander
94c40b3eb7
Postgres: implement numeric and BigDecimal support
2020-03-18 19:06:14 -07:00
Ryan Leckey
06be59f7f0
Remove MaybeOwned
2020-03-18 17:08:44 -07:00
Ryan Leckey
d1af2fe1b0
Prepare v0.3.0-alpha.1
2020-03-18 16:58:42 -07:00
Ryan Leckey
9d9d2bbfd4
Update dependencies
2020-03-18 16:56:24 -07:00
Ryan Leckey
6f4c478fb7
sqlite: fix NULL handling
2020-03-18 16:52:27 -07:00
Ryan Leckey
2f78ce094c
mysql: use correct default port
2020-03-17 22:02:01 -07:00
Ryan Leckey
d380f4b4a8
remove is_null_type and use Option<TypeInfo>
2020-03-17 21:43:41 -07:00
Ryan Leckey
927e2b1586
describe: fix Debug of Column
2020-03-17 21:34:12 -07:00
Ryan Leckey
b04f2cbd4d
sqlite: fix detection of INT and CHAR types
2020-03-17 21:34:01 -07:00
Austin Bonander
6cea7e2c1b
macros: add proper test for sqlite using database file
2020-03-17 21:10:19 -07:00
Austin Bonander
8328e07c97
macros + sqlite: fix error for null-typed columns
2020-03-17 21:10:19 -07:00
Ryan Leckey
2a76123bc3
Merge pull request #134 from launchbadge/derives
...
Add derives to support custom types
2020-03-17 20:04:19 -07:00
Ryan Leckey
21059620dc
mysql: support understanding ENUM as TEXT
2020-03-17 19:26:31 -07:00
Ryan Leckey
c1e6b2045c
postgres: support null in a record
2020-03-17 19:26:15 -07:00
Brian Misiak
459828ee3d
postgres: remove IntervalStyle to fix #130
...
Support more server versions, including CockroachDB, which only supports the `postgres` style.
2020-03-17 17:55:27 -07:00
Ryan Leckey
100602187f
memo: add more documentation to the database module
2020-03-17 16:33:44 -07:00
Ryan Leckey
602e61ab27
postgres: add support for decoding anonymous tuples and more fully test encoding/decoding records
2020-03-17 02:47:37 -07:00
Ryan Leckey
4e7b1b51e0
sqlite: handle encoding nulls
2020-03-17 01:13:32 -07:00
Ryan Leckey
a5d17eab00
add derive(Debug) for PgValue
2020-03-17 01:13:15 -07:00
Ryan Leckey
ced6713f57
add trailing newline
2020-03-17 01:11:15 -07:00
Tom Dohrmann
8841f83e68
removed unused imports
2020-03-16 22:58:31 -07:00
Tom Dohrmann
4cd179d42b
move decode_struct_field and encode_struct_field to sqlx-core
2020-03-16 22:58:31 -07:00
Tom Dohrmann
c3aeb275c2
add derive macros for weak & strong enums and structs
2020-03-16 22:58:25 -07:00
Ryan Leckey
ada57fa566
postgres depends on Sink from futures
2020-03-16 22:55:25 -07:00
Ryan Leckey
e0ca521889
cursor: for now, add #[doc(hidden)] to from_connection and from_pool as we look for ways to remove them
2020-03-16 22:51:55 -07:00
Ryan Leckey
d8f3953d9d
depend on std feature in futures-channel
2020-03-16 20:32:36 -07:00
Ryan Leckey
4869f48f84
sqlite: don't leak on connection failure
2020-03-16 20:30:28 -07:00
Ryan Leckey
48714e8ea9
Remove unused import in postgres/listen.rs
2020-03-16 20:00:36 -07:00
Ryan Leckey
0e3eb7ce39
postgres: listen: go back to Vec<String> for channels
2020-03-16 19:54:38 -07:00
Ryan Leckey
57d414f15c
sqlite: fix impl of DatabaseError
2020-03-16 19:54:24 -07:00
Ryan Leckey
e99e80cf94
listen: merge PgListener and PgPoolListener; allow PgListener to be used as an Executor; allow channels to be adjusted at run-time
2020-03-16 18:35:37 -07:00
Ryan Leckey
ed9d6c3b62
pool: handle reconnects during "boot"
2020-03-16 18:34:09 -07:00
Ryan Leckey
f677748a3b
postgres: Add lifetime to NotificationResponse
2020-03-16 18:31:09 -07:00
Ryan Leckey
b80080a95b
postgres: Stream::read -> Stream::receive and extract "just reading" to Stream::read
2020-03-16 18:30:45 -07:00
Ryan Leckey
0ecacfaf1d
io: forward lifetime properly in Buf trait
2020-03-16 18:29:54 -07:00
Ryan Leckey
1d0100b35d
Add DatabaseError::code
2020-03-16 18:29:41 -07:00
Ryan Leckey
5cb0d9d9cc
connection: remove unused import for MaybeOwned
2020-03-16 18:27:22 -07:00
Ryan Leckey
12e250b52c
Inline MaybeOwned in ConnectionSource and add another variant to store owned or ref connections
2020-03-15 02:58:41 -07:00
Ryan Leckey
4419aea619
update postgres/listen.rs for internal changes
2020-03-15 02:17:14 -07:00
Anthony Dodd
3db54dd724
Remove the Drop impl for PgPoolListener.
...
This is being removed as it was causing undesired behavior under some
contexts.
2020-03-15 02:17:14 -07:00
Anthony Dodd
82923a1aaa
Update stream impls.
...
The basic PgListener stream impl now yields `Result<PgNotification>`
elements without an `Option` in the result. The option condition
originally represented the closure of the underlying connection. Now
such conditions will terminate the stream, as one would expect. The
`PgListener.recv()` method signature has not been changed.
PgPoolListener has also been updated. The interfaces on this struct will
never yield an inner `Option` as it will instead acquire a new
connection and continue its work. Both the stream impl & the `recv`
method have received an update to their signatures.
2020-03-15 02:17:14 -07:00
Anthony Dodd
608556f91a
Impl Drop for PgPoolListener & add to exports.
2020-03-15 02:17:14 -07:00
Anthony Dodd
ae7e15cbe3
Added demo program to show use of LISTEN/NOTIFY.
2020-03-15 02:17:14 -07:00
Anthony Dodd
a0da99e128
A good bit of refactoring.
...
Broke up PgListener into two types. PgListener for basic one-off
connections, and PgPoolListener for the listener created from the
PgPool.
The API is a bit more clear now with this change in terms of reconnect
behavior and the like.
Update `fn stream` to be `fn into_stream`, as that nomenclature is a bit
more normative in the Rust ecosystem.
2020-03-15 02:17:14 -07:00
Anthony Dodd
f83180861b
Impl a few features & refactor some code based on design discussion.
...
Extension traits are now being used for PgConnection, PgPoolConnection &
PgPool for listen/notify functionality. Only two extension traits were
introduced.
Only a single trait method is present on the extension traits and it
works for single or multi channel listening setups.
Automatic reconnect behavior is implemented for PgPool based listeners.
All logic has been cut over to the `recv` impls for the PgListener
variants.
Use async-stream for a nice Stream interface.
2020-03-15 02:17:14 -07:00
Anthony Dodd
cb186e6a13
Updates from review and from testing.
2020-03-15 02:17:14 -07:00
Anthony Dodd
a52f36468b
Implement Postgres LISTEN interface.
...
This changeset introduces an interface for using PostgreSQL's LISTEN
functionality from within sqlx.
The listen interface is implemented over the PgConnection, PgPool & the
PgPoolConnection types for ease of use. In the case of PgPool, a new
connection is acquired, and is then used for LISTEN functionality.
Closes #87
2020-03-15 02:17:14 -07:00
Ryan Leckey
ab20db14a2
Remove Sqlite prefix from SqliteStatement as it is an internal API
2020-03-15 02:16:31 -07:00
Ryan Leckey
68d4a0d258
sqlite: produce connection specific errors
...
postgres, mysql: use derive for Debug for error types
2020-03-15 02:14:23 -07:00
Ryan Leckey
f667910cbf
sqlite: SqliteResultValue -> SqliteValue to match other drivers
2020-03-15 01:54:43 -07:00
Ryan Leckey
426361f361
sqlite: make SqliteConnection and Statement !Sync
2020-03-15 01:48:51 -07:00
Ryan Leckey
69b1d7feaa
sqlite: add even more notes about Send/Sync
2020-03-15 00:34:13 -07:00
Ryan Leckey
97b50b95c0
sqlite: ensure that we additionally clear the bindings when resetting the statement
2020-03-14 23:48:00 -07:00
Ryan Leckey
2abc451655
sqlite: re-order Executor methods
2020-03-14 23:45:14 -07:00
Ryan Leckey
21097e1436
sqlite: clarlify Sync guarantee
2020-03-14 23:45:03 -07:00
Ryan Leckey
dd99fc351c
suppress unused warnings
2020-03-14 19:54:19 -07:00
Ryan Leckey
cddaf1b34e
remove unused import for spawn_blocking
2020-03-14 19:47:36 -07:00
Ryan Leckey
69ea41de1e
sqlite: make the implementation far less naive
...
* WAL
* sync = NORMAL, thought on this for awhile, all signs point to this being a very good default for WAL usage
* separate worker thread per SQLite connection
2020-03-14 19:45:01 -07:00
Ryan Leckey
63ef32189d
sqlite: implement support for multiple statements
2020-03-14 17:43:44 -07:00
Ryan Leckey
0130fe1479
sqlite: implement describe
2020-03-14 17:43:44 -07:00
Ryan Leckey
5f27026459
sqlite: implement remainder of query API
2020-03-14 17:43:44 -07:00
Ryan Leckey
a3799c3496
sqlite: implement command execution
2020-03-14 17:43:44 -07:00
Ryan Leckey
751efdf31b
generalize MaybeOwnedConnection and clean up the connection file
2020-03-14 17:43:44 -07:00
Ryan Leckey
444ffff127
Run rustfmt
2020-03-14 17:43:44 -07:00
Ryan Leckey
30897dd6d9
Add additional notes to Executor
2020-03-14 17:43:44 -07:00
Ryan Leckey
0421c9fb42
Add explicit life times to Cursor
2020-03-14 17:43:44 -07:00
Ryan Leckey
1a48cf3b2c
Reduce some duplication in type parsing
2020-03-14 17:43:44 -07:00
Ryan Leckey
7ab07016da
sqlite: initial work in connection
2020-03-14 17:43:44 -07:00
Ryan Leckey
5d042e35b1
sqlite: stub
2020-03-14 17:43:44 -07:00
Ryan Leckey
553f03fa05
Add Database::RawBuffer to parameterize Encode
2020-03-14 17:43:44 -07:00
Ryan Leckey
cca096355f
Run rustfmt
2020-03-14 17:43:44 -07:00
Ryan Leckey
27cd552a8c
mysql: clean up protocol
2020-03-14 17:43:44 -07:00
Ryan Leckey
7a98253840
postgres: clean up protocol
2020-03-14 17:43:06 -07:00
Ryan Leckey
c7d416a1c3
Add Connection::begin
2020-03-14 17:43:06 -07:00
Ryan Leckey
cc88efe436
mysql: handle EOF packets if the server still requires them (MariaDB 10.1)
2020-03-14 17:29:59 -07:00
Ryan Leckey
12fa401556
log: trace the MySQL capability flags
2020-03-14 17:29:22 -07:00
Ryan Leckey
0a7415f542
Run rustfmt
2020-03-11 03:34:51 -07:00
Ryan Leckey
a165615f53
row: Row::get panics, Row::try_get is fallible, Query::map panics, Query::try_map is fallible
2020-03-11 03:32:52 -07:00
Ryan Leckey
9609a62ed1
Run rustfmt
2020-03-11 02:51:24 -07:00
Ryan Leckey
c14338d329
remove unused imports
2020-03-11 02:29:20 -07:00
Ryan Leckey
0eed8c5866
mysql: fix handling of multiple query statements for affected_rows
2020-03-11 02:18:45 -07:00
Ryan Leckey
69489caa4b
mysql: initialize sql-mode and other options on establish
2020-03-11 02:18:27 -07:00
Ryan Leckey
e047f7c353
Remove custom Execute impl (no longer needed)
2020-03-11 01:55:18 -07:00
Ryan Leckey
e701aef9af
Annotate the DB type for Decode in Decode for String
2020-03-11 01:55:06 -07:00
Ryan Leckey
038a6f2d30
Fix tests for MySQL chrono
2020-03-11 01:54:46 -07:00
Ryan Leckey
d6ce866c4b
Fix TLS refactors for MySQL
2020-03-11 01:54:33 -07:00
Ryan Leckey
a9c3d9f44c
Run rustfmt
2020-03-11 01:49:47 -07:00
Ryan Leckey
c9df8acc41
Add zero-allocation to MySQL query execution
...
WIP mysql compiles with types and executor commented out
2020-03-11 01:47:29 -07:00
Austin Bonander
de14a206ff
remove pin-project
workaround
2020-03-11 01:47:29 -07:00
Ryan Leckey
672f83c00e
use pin-project and fix impl of GuardedFlush
2020-03-11 01:47:29 -07:00
Austin Bonander
f3fe264478
implement guarded flush for BufStream
...
closes #122
2020-03-11 01:47:29 -07:00
Austin Bonander
9cd3f5e75b
rename Query::map()
to try_map()
and nail down some semantics
2020-03-11 01:47:29 -07:00
Austin Bonander
800af574c5
query_macros: allow Option<&str>
to be passed in place of String
...
closes #93
2020-03-11 01:47:16 -07:00
Austin Bonander
4163388298
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>
2020-03-11 01:46:06 -07:00
Ryan Leckey
59cf900348
impl RefExecutor for &mut E ( where E is RefExecutor ) to allow &mut &Pool to continue working in 0.3
2020-03-11 01:46:06 -07:00
Ryan Leckey
13caade571
silence some unused warnings in postgres/tls with tls not compiled in
2020-03-11 01:46:06 -07:00
Ryan Leckey
6ffcf41b0f
implement RefExecutor ( allow Query/QueryAs ) for Transaction
2020-03-11 01:46:06 -07:00
Ryan Leckey
10d2b45d9c
update dependencies and clean up some more unused imports
2020-03-11 01:46:06 -07:00
Ryan Leckey
b8cd2e9388
remove unused imports
2020-03-11 01:45:04 -07:00
Ryan Leckey
10232a2cdc
remove re-exports from sqlx-core and let sqlx fully define the module layout
2020-03-11 01:45:04 -07:00
Ryan Leckey
f337f1c602
postgres: implement text mode for chrono and clean up type tests
2020-03-11 01:44:41 -07:00
Ryan Leckey
7fbc26de05
tls: update tls module for postgres
2020-03-11 01:44:41 -07:00
Ryan Leckey
370ad81b8e
remove now unused pieces of ConnectionSource and MaybeOwnedConnection
2020-03-11 01:44:41 -07:00
Ryan Leckey
47f3d77e59
query_as: fully implement query_as, required a db-specific ext trait
2020-03-11 01:44:41 -07:00
Ryan Leckey
f18ab2fecb
tweak type decoding in text mode for floats
2020-03-11 01:44:06 -07:00
Ryan Leckey
4c102f7b0e
Database::Connection requires a Connection that can be connected
2020-03-11 01:44:06 -07:00
Ryan Leckey
8e8cf6db20
postgres: fix various issues and add more tests
2020-03-11 01:44:06 -07:00
Ryan Leckey
433aab1e5b
postgres: use RawValue in Decode and implement row-returning simple queries
2020-03-11 01:44:06 -07:00
Ryan Leckey
9f1cf953c0
decode: use HasRawValue
2020-03-11 01:43:27 -07:00
Ryan Leckey
dd5f250e5e
decode: add lifetime to Decode; impl Decode for &str and &[u8]; remove DecodeError
2020-03-11 01:43:27 -07:00
Ryan Leckey
d257c32946
postgres: handle NoticeResponse
2020-03-11 01:43:27 -07:00
Ryan Leckey
09f30067a0
Error::NotFound -> Error::RowNotFound and remove Error::FoundMoreThanOne
2020-03-11 01:43:27 -07:00
Ryan Leckey
e0fa55f241
Add additional docs to Query::bind
2020-03-11 01:43:27 -07:00
Ryan Leckey
817d07c081
Use non_exhaustive on sqlx::Error
2020-03-11 01:43:27 -07:00
Ryan Leckey
f462343787
Split Executor into Executor and RefExecutor
...
* Allow `conn.fetch(" ... ")` to be called where `conn` is an owned Connection
* Executor::fetch -> RefExecutor::fetch_by_ref
* Executor::fetch_by_ref -> Executor::fetch
* Move `Connection::describe` to `Executor::describe`
* `Transaction` is no longer a `Connection`
* `Connection` has `Executor` as a super-trait again which greatly simplifies bounds
2020-03-11 01:43:27 -07:00
Ryan Leckey
0afcf33395
rename Executor::execute to Executor::fetch
2020-03-11 01:43:27 -07:00
Ryan Leckey
72b60e8a7d
remove the DB type parameter from HasCursor and push to an associated type; remove Cursor::first
2020-03-11 01:43:27 -07:00
Ryan Leckey
d981262e7e
row: RowIndex -> ColumnIndex and de-duplicate logic with macros
2020-03-11 01:43:27 -07:00
Austin Bonander
0cb7bd1185
make macros work again
2020-03-11 01:43:27 -07:00
Ryan Leckey
55ffd989e1
postgres: add support for simple queries (that do not return results)
2020-03-11 01:43:17 -07:00
Ryan Leckey
7404708bab
adjust Cursor::map to work through black magic hacks and hope we get GATs soon
2020-03-11 01:43:17 -07:00
Ryan Leckey
a374c18a18
postgres: rewrite protocol in more iterative and lazy fashion
2020-03-11 01:43:17 -07:00
Ryan Leckey
3795d15e1c
postgres: break out TLS and SASL into their own files
2020-03-11 01:43:04 -07:00
Ryan Leckey
ea1a4fb042
add Cursor and rewrite Executor/Query over it
...
* this breaks a lot internally as-is
* mysql needs a restructure
2020-03-11 01:43:04 -07:00
Ryan Leckey
bb17ebfbbd
make Connect extend Connection to simplify bounds
2020-03-11 01:42:34 -07:00
Ryan Leckey
d3d58ef0cf
remove unused methods from Arguments: is_empty, len, size
2020-03-11 01:42:34 -07:00
Ryan Leckey
05bc3ba987
Prepare v0.2.6
2020-03-10 15:40:33 -07:00
Wesley Norris
737dd038c5
Fix null bitmap being cleared
2020-03-09 20:31:49 -04:00
Vlad Stepanov
b785f83fc2
[fix] naming + unneeded cast
2020-03-01 18:02:36 +03:00
Vlad Stepanov
0656c880cc
cargo fmt
2020-03-01 13:23:57 +03:00
Vlad Stepanov
b2f50de16f
review fixes: change test attributes, fix tests, add time encoding-decoding tests
2020-03-01 13:20:24 +03:00
Vlad Stepanov
1975486baa
cargo fmt
2020-03-01 00:05:14 +03:00
Vlad Stepanov
084add9cdb
#115 : implement time-rs support
2020-02-29 22:38:48 +03:00
Oliver Bøving
0de4b5186b
Add the array types to the query! macro
...
This still needs some work, as the inferance and error messages are not
quite where we want them to be
2020-02-25 21:56:07 +01:00
Oliver Bøving
11b36fc7e5
Remove unused method extend
on ArrayEncoder
2020-02-21 14:18:20 +01:00
Oliver Bøving
521570d8a7
Remember use std::marker::PhantomData
2020-02-21 14:16:02 +01:00
Oliver Bøving
c9c87b6081
Implement support for 1-dim arrays for PostgreSQL
2020-02-21 14:10:12 +01:00
Ryan Leckey
f8e112f4d9
Prepare v0.2.5
2020-02-01 00:49:27 -08:00
Ryan Leckey
7201f637bf
Fix #104 , need to advance buffer index to account for the null (one 32-bit length val of -1)
2020-02-01 00:33:59 -08:00
Austin Bonander
eff7c9e125
fix Pool
to remove possibility of "leaking" connections ( #84 )
...
* fix `Pool` to reduce possibility of "leaking" connections
now uses RAII guards to control `SharedPool::size`
* add smoke test for `Pool` to both Postgres and MySQL tests
add `Pool::is_closed()`
* fix documentation re: pool
* refactor pool implementation to not use futures oneshot channels
https://github.com/launchbadge/sqlx/pull/84#issuecomment-580476223
* run cargo fmt
* Pool: remove superfluous guard struct, document some internal methods
2020-01-31 23:33:42 -08:00
Austin Bonander
2349978417
fix and test floats in MySQL
2020-01-30 12:17:32 -08:00
Jane Lusby
7d3772e23b
Resolve PR comments
2020-01-22 20:49:22 -08:00
Jane Lusby
ea03fa47e7
Initial commit with doc_cfg changes
2020-01-22 13:10:10 -08:00
Ryan Leckey
24d6c696f8
Merge pull request #70 from launchbadge/ab/idents-fix
...
sqlx-macros: fix handling of invalid idents
2020-01-21 16:01:56 -08:00
Wesley Norris
1461891901
Fix passwords not being percent decoded
...
The password portion of the `Url` type is post-percent encoding
and needs to be manually decoded before processing and being
sent to the server.
2020-01-21 18:53:07 -05:00
Austin Bonander
d55e4568b8
fix build with tls
and runtime-tokio
features on
2020-01-21 12:24:54 -08:00
Austin Bonander
831ce2d615
fix build with TLS feature on
2020-01-21 11:57:01 -08:00
Austin Bonander
efed9b3d6d
sqlx-macros: fix handling of invalid idents
...
add regression test with Trybuild
fix lint warnings as otherwise Trybuild wanted to include them
2020-01-21 01:52:57 -08:00
Jonas Platte
f93beb460a
Add PgTypeInfo::with_oid
2020-01-18 14:04:17 +01:00
Ryan Leckey
3e6efc57b6
Prepare v0.2.4
2020-01-18 01:22:14 -08:00
Ryan Leckey
60d45ac44b
Fix (again) the handling of nulls in mysql and add an integration test for it
2020-01-18 01:20:26 -08:00
Ryan Leckey
ac9aeb2e26
Prepare v0.2.3
2020-01-18 00:47:26 -08:00
Ryan Leckey
d00c18ec75
Fix query! for the no results case in Postgres and MySQL
2020-01-18 00:43:59 -08:00
Ryan Leckey
3b91b06828
Prepare v0.2.2
2020-01-16 18:31:48 -08:00
Ryan Leckey
35c5556512
Update dependencies
2020-01-16 18:29:58 -08:00
Austin Bonander
beba141aec
PgConnection: clear buffers after TLS upgrade
2020-01-16 13:30:48 -08:00
Ryan Leckey
d46acb0e0e
default sqlx-core and sqlx-macros to runtime-async-std as well to make "cargo c" work during dev
2020-01-16 12:51:08 -08:00
Ryan Leckey
fe3225a8b8
Prepare v0.2.1
2020-01-16 01:52:47 -08:00
Daniel Akhterov
5ad09887e0
Fix mysql null bitmap not starting at bit 3
2020-01-16 01:44:20 -08:00
Ryan Leckey
62e1df5ad9
Prepare v0.2.0
2020-01-15 02:20:19 -08:00
Ryan Leckey
809bc3964c
Run rustfmt
2020-01-15 01:34:20 -08:00
Ryan Leckey
ae4fcd1406
Work around bug with format! and await on stable
2020-01-15 01:32:16 -08:00
Ryan Leckey
daf7f6c556
Be explicit with features for docs.rs
2020-01-15 01:27:07 -08:00
Ryan Leckey
92f12e11aa
Add support for Tokio
2020-01-15 01:17:33 -08:00
Ryan Leckey
96f14c0700
Merge remote-tracking branch 'origin/ab/proc-macro-unhack-sort-of' into rl-transaction-1
2020-01-15 00:29:43 -08:00
Ryan Leckey
6ddf3184de
Run rustfmt
2020-01-15 00:27:19 -08:00
Ryan Leckey
2e5e273565
Fix Pool alias with Pool changes
2020-01-15 00:26:22 -08:00
Ryan Leckey
b1a27ddac2
Add a Transaction type to simplify dealing with Transactions
2020-01-15 00:22:01 -08:00
Austin Bonander
0fdb875c20
support arbitrary numbers of bind parameters in query!()
et al
2020-01-15 00:05:34 -08:00
Ryan Leckey
28ed854b03
Extract Connection::open into a new trait Connect::connect
2020-01-14 23:58:17 -08:00
Ryan Leckey
3183413e9e
Merge pull request #50 from launchbadge/rl-refactor-types
...
Refactor HasSqlType to provide an array of compatible types
2020-01-14 23:32:45 -08:00
Ryan Leckey
6b22fb7489
Refactor HasSqlType to provide an array of compatible types.
...
* Intending to use in a new Row type to check types at runtime for
dynamic queries and to guard against schema changes
* Hoping the query! macro can utilize this to allow accepting N
rust types for 1 sql type and returning N rust types for 1 sql
type.
2020-01-14 23:27:42 -08:00
Austin Bonander
114aaa5dfc
MySqlConnection: warn if server does not support SSL
2020-01-14 12:14:01 -08:00
Austin Bonander
fc66c8fa3f
give examples of connection strings enabling SSL
2020-01-14 12:07:43 -08:00
Ryan Leckey
330b1e2b4e
Fix serialization test for postgres
2020-01-14 10:43:54 -08:00
Ryan Leckey
0a5b527d79
fix import errors and run rustfmt
2020-01-14 10:35:50 -08:00
Ryan Leckey
cb1dbff544
mysql: if in a TLS stream, sha2 auth is just "send a clear text password"
2020-01-14 10:32:59 -08:00
Austin Bonander
6682d4dce7
Pool::new(): forward to connection types for string syntax
2020-01-13 20:43:32 -08:00
Austin Bonander
c92ee619c3
fix some behaviors with TLS in MySQL
2020-01-13 20:42:49 -08:00
Austin Bonander
a014accf08
document TLS options for MySQL
2020-01-13 14:58:37 -08:00
Austin Bonander
f04e4bdbeb
document TLS options for Postgres
2020-01-13 14:54:29 -08:00
Austin Bonander
ff219061b2
implement TLS for MySQL
2020-01-13 12:34:05 -08:00
Austin Bonander
638852a2dd
implement TLS support for Postgres
2020-01-13 11:52:09 -08:00
Ryan Leckey
fe98b0b612
Turn on neccessary feature flags of futures-channel and async-std
2020-01-11 04:06:33 -08:00
Ryan Leckey
1d20926189
Use '+00:00' over UTC for MySQL timezone
2020-01-11 03:54:04 -08:00
Ryan Leckey
9b50dccfce
Run rustfmt
2020-01-11 03:52:17 -08:00
Ryan Leckey
c4a0ac50df
Indicate that we support both forms of SCRAM (just always reject channel binding for now)
2020-01-11 03:52:12 -08:00
Ryan Leckey
4f28590def
Downgrade generic-array to match digest
2020-01-11 03:35:38 -08:00
Daniel Akhterov
db230e2ce0
Resolve Comments
...
- Remove `hex` from root `Cargo.toml`
- Make `hmac` crate optional
- Clean up checking mechanisms for "SCRAM-SHA-256"
- Use `str::from_utf8` instead of `String::from_utf8_lossyf
- Update `Sasl*Response` structs be tuple structs
- Factor out `len` in `SaslInitialResponse.encode()`
- Use `protocol_err` instead of `expect` when constructing `Hmacf
instances
- Remove `it_connects_to_database_user` test as it was too fragile
- Move `sasl_auth` function into `postgres/connection` as it more
related to `Connection` rather than `protocl`
- Return an error when decoding base64 salt rather than panicing
in `Authentication::SaslContinue`
2020-01-11 03:33:38 -08:00
Daniel Akhterov
507d988fc4
Implememnt SASL Authentication
2020-01-11 03:33:21 -08:00
Ryan Leckey
fec6101e1a
Use timeout over .timeout to stay off unstable
2020-01-11 03:31:55 -08:00
Ryan Leckey
619de5aac2
Update dependencies
2020-01-11 03:30:03 -08:00
Ryan Leckey
95fac72abf
Use crossbeam queues to achieve fairness in the pool
2020-01-11 03:26:48 -08:00
Ryan Leckey
03251b719b
Refactor pool to fix liveness and consistently check
2020-01-11 01:02:03 -08:00
Ryan Leckey
132f7b2944
Add test_on_acquire option to the Pool
2020-01-11 01:01:21 -08:00
Ryan Leckey
42d0a9bc3d
has_columns is only used for postgres
2020-01-11 01:00:24 -08:00
Andrey Kuznetsov
e7026ce92d
derive Debug for Pool
2020-01-10 23:36:50 +00:00
Kris
7464d35803
Check if enough bytes was received
2020-01-07 11:44:15 +01:00
Kris
bad21b1567
Build docs for all features ( #32 )
2020-01-06 23:57:55 -08:00
Ryan Leckey
6d525b23ed
(cargo-release) sqlx-core: v0.1.3
2020-01-06 11:10:24 -08:00
Ryan Leckey
280f12ea71
Configure release.toml so we can easily release sub crates
2020-01-06 11:10:20 -08:00
Ryan Leckey
92f3f8cf6f
Finish reallocation strategy for BufStream
...
Fixes #30
2020-01-06 10:53:56 -08:00
Ryan Leckey
5c532a8ecc
[sqlx-core] prepare v0.1.2
2020-01-05 22:00:56 -08:00
Austin Bonander
589d06ec66
change UnexpectedEof
to ConnectionAborted
2020-01-03 19:06:00 -08:00
Ryan Leckey
054d3ed838
Run rustfmt on auth_plugin
2020-01-03 17:55:34 -08:00
Ryan Leckey
d8df21e280
Tweak mysql connection to work with MariaDb
...
SECURE_CONNECTION has the wrong value in the mariadb docs and that had me stumped for too long
2020-01-03 17:53:24 -08:00
Ryan Leckey
8d8fea874a
Use forbid(unsafe_code) over deny(unsafe_code)
2020-01-03 11:45:18 -08:00
Ryan Leckey
ed8cb40245
Remove more unused imports
2020-01-02 23:49:42 -08:00
Ryan Leckey
4ced4058ac
Remove unused imports and a couple unused muts
2020-01-02 23:47:49 -08:00
Ryan Leckey
ce343dee9c
[MySQL] Add initial support for authenticationSupports caching_sha2_password and sha256_password
2020-01-02 23:22:46 -08:00
Ryan Leckey
e591f0f021
Run rustfmt
2019-12-30 02:11:14 -08:00
Ryan Leckey
19e38ab8d3
[MySQL] [Postgres] Add support for BLOB and BYTEA types
2019-12-30 02:10:09 -08:00
Ryan Leckey
27759a12c7
[MySQL] Allow not specifying database on initial connect
2019-12-30 02:10:09 -08:00
Ryan Leckey
c325feaf9a
[MySQL] Configure connection on open
2019-12-30 02:10:09 -08:00
Ryan Leckey
2a42ff9f0d
[MySQL] Add an integration tests for chrono + MySQL and fix issues
2019-12-30 02:10:09 -08:00
Ryan Leckey
e161787952
[MySQL] Rename ty.flag to ty.is_unsigned
2019-12-30 02:10:09 -08:00
Ryan Leckey
3a645a1824
[MySQL] Don't adjust the raw bytes coming to the Decode trait
...
This is a minor adjustment that keeps parity between Encode and Decode
2019-12-30 02:10:09 -08:00
Ryan Leckey
2068f05482
Update dependencies
2019-12-28 04:02:52 -08:00
Ryan Leckey
5e719917c0
Run rustfmt
2019-12-28 03:45:47 -08:00
Ryan Leckey
f67872cbcf
Add some ground work for #1
2019-12-28 03:45:37 -08:00
Ryan Leckey
86ac601872
Prepare v0.1.1
2019-12-28 02:42:51 -08:00
Austin Bonander
c98c49ad47
fix docs and guarantees for pool
2019-12-28 02:02:29 -08:00
Ryan Leckey
dc43d3ee2f
Merge branch 'master' of ssh://github.com/mehcode/sqlx
2019-12-28 01:01:50 -08:00
Ryan Leckey
e16c043bf9
Add basic docs to MySql and Postgres Connection
2019-12-28 01:01:45 -08:00
Austin Bonander
af4b5b753d
fixup docs for Query
/QueryAs
/Executor
2019-12-28 00:56:55 -08:00