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
dc8e36c707
listen: prefix example with sqlx-example-
2020-03-16 18:27:04 -07:00
Ryan Leckey
4419aea619
update postgres/listen.rs for internal changes
2020-03-15 02:17:14 -07:00
Anthony Dodd
75a76395c6
Rename new example to match current nomenclature.
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
Ryan Leckey
433aab1e5b
postgres: use RawValue in Decode and implement row-returning simple queries
2020-03-11 01:44:06 -07:00
Ryan Leckey
a374c18a18
postgres: rewrite protocol in more iterative and lazy fashion
2020-03-11 01:43:17 -07:00
Nicholas Connor
745c5c3957
Updated the README example with acquire connection ( #99 )
...
* Updated the README example with acquire connection
Initially from reading the docs and examples I tried to use `&mut pool` instead of `&mut conn`. The compiler gave me an error that `Pool<MySql>` didn't implement `Executor`. I had to do a bit of digging and eventually just viewed the source of `Pool` to find `acquire()`, `try_acquire()` etc.
I think this change makes it a bit easier for someone to get started.
* Update README.md to reference initial pool declaration
* Fixed compile issues and added examples of using &mut &pool
2020-01-31 23:30:08 -08:00
Ryan Leckey
bdfea1a3cb
Merge pull request #90 from xcthulhu/master
...
Making realworld-postgres example compile
2020-01-31 23:28:49 -08:00
Jon Pacheco
cc7ef143cf
Make "done" attribute not null
2020-01-28 15:10:09 +00:00
Jon Pacheco
4f61390f15
Address comments
2020-01-28 08:30:30 +00:00
Jon Pacheco
eece922ac3
Add todos CLI example for postgres
2020-01-27 10:17:58 +00:00
Matthew Doty
1e5e1eceb4
Making realworld-postgres example compile
2020-01-26 19:43:39 -05:00
Ryan Leckey
c13c1cc817
Add a bit more notes to the example about transactions
2020-01-15 00:26:13 -08:00
Ryan Leckey
b1a27ddac2
Add a Transaction type to simplify dealing with Transactions
2020-01-15 00:22:01 -08:00
Ryan Leckey
95fac72abf
Use crossbeam queues to achieve fairness in the pool
2020-01-11 03:26:48 -08:00
Ryan Leckey
132f7b2944
Add test_on_acquire option to the Pool
2020-01-11 01:01:21 -08:00
Austin Bonander
43f1164823
fix macro examples and tests
2020-01-03 19:02:31 -08:00
Ryan Leckey
2068f05482
Update dependencies
2019-12-28 04:02:52 -08:00
Ryan Leckey
3cb9ddb8c6
Apply auto ref fixes to example
2019-12-28 00:23:04 -08:00
Ryan Leckey
8626cf5ba8
Tweak macro to only accept literals
2019-12-27 23:11:23 -08:00
Ryan Leckey
61237b8503
Implement Register and GetCurrentUser for RealWorld
2019-12-27 22:47:39 -08:00
Ryan Leckey
a23bfb60eb
Clean up the example a touch
2019-12-27 21:50:13 -08:00
Austin Bonander
7d745f98ea
implement query_as!()
et al, document query macros
2019-12-27 21:45:31 -08:00
Ryan Leckey
56a82346f2
Run cargo fmt
2019-12-27 20:44:03 -08:00
Ryan Leckey
d76b1357da
Audit MySql and Postgres protocols
2019-12-27 17:31:01 -08:00
Ryan Leckey
871183d23b
Minor fixes and run rustfmt
2019-12-03 00:22:02 -08:00
Ryan Leckey
9558ab1c50
Remove bytes usage and update dependencies
2019-12-02 23:26:44 -08:00
Ryan Leckey
2227303f20
Have Backend require Executor and de-duplicate some logic
2019-11-27 23:26:20 -08:00
Ryan Leckey
1e6e21046a
Just call the example realworld
2019-11-27 15:23:00 -08:00
Ryan Leckey
49b1eab1f7
Clean up example and start a basic realworld one
2019-11-27 15:21:56 -08:00
Ryan Leckey
73ca673bf2
Integrate FromRow while maintaining type fallback for query!
2019-11-25 23:51:04 -08:00
Ryan Leckey
b87edd5a9a
Unify sqlx::CompiledSql and sqlx::SqlQuery into sqlx::Query as a common return type between sqlx::query and sqlx::query!
2019-11-22 22:41:37 +00:00
Ryan Leckey
b14d3da2ee
Add sqlx::Row
...
- Rename the existing trait to an internal RawRow trait
- Row is used for selecting a dyn and deferring pulling its values out till later
- FromSqlRow -> FromRow
2019-11-22 18:34:29 +00:00
Ryan Leckey
fecd367e8d
Update dependencies
2019-11-21 23:59:38 +00:00
Ryan Leckey
e47e90ec75
Add small tide example
2019-11-21 23:29:40 +00:00
Ryan Leckey
ee30296e32
Run rustfmt and remove some unneeded stuff
2019-08-28 08:08:24 -07:00
Ryan Leckey
c33530b25c
Extract BufStream from PostgresRawConnection
2019-08-25 14:01:07 -07:00
Ryan Leckey
6c98ba01b8
Add inherent helpers to executors
2019-08-22 22:23:15 -07:00
Ryan Leckey
c5a3fc8d7e
Split up RawQuery into QueryParameters and &str
2019-08-22 21:53:55 -07:00
Ryan Leckey
459a091f74
Initial work on moving to sqlx::Error
2019-08-22 19:59:03 -07:00
Ryan Leckey
aefcdd23fa
Use postgres instead of pg for the module name
2019-08-22 19:59:03 -07:00
Ryan Leckey
122700a789
Clean up examples
2019-08-20 18:26:37 -07:00
Ryan Leckey
6a18d0effd
Wrap the query in a top-level SqlQuery to facilitate type inference.
2019-08-20 18:06:00 -07:00
Ryan Leckey
5e001045e2
Update rust and dependencies
2019-08-19 12:25:01 -07:00
Ryan Leckey
cdf7453f8f
Run rustfmt
2019-08-18 20:42:45 -07:00
Ryan Leckey
d0b9bda74f
Use the pool to insert quickly
2019-08-18 19:06:15 -07:00
Ryan Leckey
c280ad587f
Move to sqlx::query( ... ).execute style API
2019-08-18 18:33:45 -07:00
Ryan Leckey
b8857af916
Make examples work again, initial experiment with sqlx::Client
2019-08-10 16:36:20 -07:00
Ryan Leckey
186fa8928b
Rework public API to be trait-focused
2019-08-10 15:31:13 -07:00