Commit graph

183 commits

Author SHA1 Message Date
Raphaël Thériault
e5e9665bd9 Add migrate! macro for embedded migrations 2020-07-23 14:22:50 -04:00
Ryan Leckey
793f247604 refactor: PoolOptions::new() takes no parameters and the final .connect method takes the URI 2020-07-14 06:07:29 -07:00
Ryan Leckey
61e4a4f566 feat: finish v1 of both cli and embedded migrations 2020-07-12 03:43:55 -07:00
Julius de Bruijn
dce7c71c37 Add macro extensions for Decimal 2020-07-09 12:32:19 -07:00
Julius de Bruijn
fd837fce09 Support for rust_decimal::Decimal 2020-07-09 12:32:19 -07:00
Austin Bonander
17e88ac1a4 perf: implement pool benchmark, make fairness an option 2020-07-03 05:59:20 -07:00
Ryan Leckey
518eb0c41a chore: add any to all-databases and to each db test in CI 2020-06-27 06:04:30 -07:00
Ryan Leckey
af7bd71ab2 test: require any feature for any/any test 2020-06-27 04:10:06 -07:00
Ryan Leckey
a7117dd71b feat(any): introduce the Any database driver which enables choosing the database driver at runtime 2020-06-27 04:07:40 -07:00
Zachery Gyurkovitz
2adfb1926a misc: Don't deadname myself in the authors 2020-06-23 13:10:03 -07:00
Ryan Leckey
d73434a19e test: enable postgres/derives test 2020-06-12 15:33:19 -07:00
Ryan Leckey
6497d67b6a feat(mssql): add macro support 2020-06-07 16:29:46 -07:00
Ryan Leckey
53c074130f Merge remote-tracking branch 'origin/ab/macro-fixes' 2020-06-07 02:35:12 -07:00
Ryan Leckey
0386d6ed6c test: re-initialize github workflow 2020-06-07 02:21:58 -07:00
Ryan Leckey
ef2527ff3e feat(mssql): fix a few bugs and implement Connection::describe 2020-06-07 02:00:31 -07:00
Ryan Leckey
2a272bdd59 feat(mssql): setup type tests for MSSQL and add support for all the int types 2020-06-07 02:00:13 -07:00
Ryan Leckey
9a701313bc feat(mssql): implement enough to get simple queries working
Co-authored-by: Daniel Akhterov <akhterovd@gmail.com>
2020-06-07 02:00:12 -07:00
Austin Bonander
80b4e2fca6
fix(macros): reintroduce and fix macro tests for MySQL 2020-06-05 21:02:24 -07:00
Austin Bonander
bddb2e560f
fix(macros): fix macros for Postgres 2020-06-05 20:28:21 -07:00
Ryan Leckey
a3053119fa fix: expose runtime-actix in sqlx/Cargo.toml 2020-06-01 05:34:52 -07:00
Ryan Leckey
51ae9f00e7
chore: bump version to 0.4.0-pre 2020-05-30 23:15:52 -07:00
Ryan Leckey
e5b6047009
feat: introduce docker-compose based testing for running locally against many database combinations 2020-05-30 17:51:55 -07:00
Ryan Leckey
88532ffc28
refactor: clean up warnings 2020-05-30 17:51:49 -07:00
Ryan Leckey
a233fbfdb7
feat(rt): introduce sqlx-rt to centralize supported runtimes 2020-05-30 16:07:02 -07:00
Austin Bonander
7dae3dbf57 rename cargo-sqlx -> sqlx-cli
edit README
2020-05-30 16:02:37 -07:00
Austin Bonander
6913695588 add support for building in "decoupled" mode 2020-05-30 16:02:37 -07:00
Ryan Leckey
cbccd68963
chore: prepare v0.3.5 2020-05-06 03:30:35 -07:00
Samani G. Gikandi
7038dd8ab2 Refactors realworld example with multi DB support
**General**

* Moves `examples/postgres/realworld` to `examples/realworld`
* The app is now architected to support multiple DBs
* Adds feature flags for `sqlite` and `postgres` to allow user to choose
  which backend to use

    *NOTE* Currently it is not possible to compile with `postgres` and `sqlite`
      enabled as we are using the `query!` and `query_as!` macros and they
      seem to get unhappy.

* Adds CLI flags for picking the DB backend to use at runtime
* Adds schema file and implementation for SQLite for `/api/user` routes
* Adds stub routes and trait for articles and Articles entity

**Changes**

* We now use i32 instead of i64 as the user_id to get around some quirks
  w/ the SQLite driver.
* Reimplements existing route handlers w/ an error handling shim so we can use
  Try inside the biz logic
* *FIX* Adds a `user` key to the register user body to conform w/ realworld's
  API specs

APIs were functionally tested using realworld's API test script
  (https://github.com/gothinkster/realworld/tree/master/api#authentication)
2020-04-17 12:42:22 -07:00
Ryan Leckey
90fd35745c Prepare v0.3.4 2020-04-10 15:56:13 -07:00
Ryan Leckey
70387214a9 Merge branch 'feature/cargo-sqlx-migrate' of git://github.com/JesperAxelsson/sqlx into JesperAxelsson-feature/cargo-sqlx-migrate 2020-04-07 14:32:10 -07:00
Ryan Leckey
e7ace2adc7 Prepare v0.3.3 2020-04-01 18:24:08 -07:00
Ryan Leckey
7c3db2285a
cargo: tweak keywords to maximize visibility on crates.io 2020-03-31 20:58:28 -07:00
Jon Pacheco
f4e4836fa6 Clone TODOs example for MySQL 2020-03-31 20:35:34 +01:00
Jon Pacheco
79a5e5e1d5 Clone TODOs example for SQLite
Differences to Postgres version:
- Minor changes to schema
- Add TODO: "RETURNING" isn't supported, so retrieve ID separately
2020-03-31 20:35:34 +01:00
Ryan Leckey
a9fc05378e Prepare v0.3.2 2020-03-31 03:02:01 -07:00
Ryan Leckey
a84e1f6626 Prepare v0.3.1 2020-03-30 18:53:03 -07:00
Jon Pacheco
501ed887e3 Restructure examples folder 2020-03-31 00:35:07 +01:00
Ryan Leckey
fc3d06bf9b Prepare v0.3.0 2020-03-29 16:27:41 -07:00
Ryan Leckey
913f906d81 docs: enable all database drivers and types 2020-03-29 15:54:59 -07:00
Jesper Axelsson
e577358686 Added migration tool to sqlx 2020-03-29 09:39:59 +02:00
Oliver Bøving
bcb3959379
Add array of uuid, chrono, time, bigdecimal, and ipnetwork as well as JsonValue to query macro (#154)
* Add array of uuid, chrono, time, bigdecimal, and ipnetwork to query macro

* Comment out tests for arrays of BigDecimal

Currently arrays of BigDecimal doesn't in query macros compile.
As all of the other types work just fine, BigDecimal is simply omitted.

* Add serde_json::Value to query macros

This also adds serde_json as an optional dependency to sqlx_macros along
side a new json feature flag.
2020-03-28 17:28:47 -07:00
Ryan Leckey
a90ff10a27 Prepare v0.3.0-alpha.2 2020-03-25 04:58:22 -07:00
Ryan Leckey
985d62009c sqlite: adjust for recent changes with RawValue 2020-03-25 02:37:10 -07:00
Ryan Leckey
fa4138b25c add docs to explain the SQL <-> Rust mapping 2020-03-24 02:56:52 -07:00
Ryan Leckey
43a72657f9 add a hack so bigdecimal can be the package name and the feature name 2020-03-24 02:56:14 -07:00
Ryan Leckey
db543f8391 clean up Time impl, impl for text modes 2020-03-21 02:34:21 -07:00
Ryan Leckey
4a98a51a19 Merge remote-tracking branch 'utter-step/time-rs' 2020-03-21 01:25:00 -07:00
Ryan Leckey
05d8ac2747 Finish up JSON/JSONB support for Postgres
* implement for &serde_json::RawValue

 * sqlx::types::Json<T> is a common type that all JSON-compatible databases can implement for,
   postgres implements Json<T> as JSONB

 * sqlx::postgres::types::PgJson<T> resolves to JSON

 * sqlx::postgres::types::PgJsonB<T> resolves to JSONB
2020-03-21 01:16:34 -07:00
Oliver Bøving
b7e53e885a First draft of JSON/JSONB support for postgres
This introduces two new wrapper types `Json` and `Jsonb`, currently
exported by `sqlx::postgres::{Json, Jsonb}` and adds serde and
serde_json as optional dependencies, under the feature flag `json`.
Wrapping types in `Json[b]` that implement `serde::Deserialize` and
`serde::Serialize` allows them to be decoded and encoded respectivly.
2020-03-20 23:59:25 -07:00
Ryan Leckey
50c3e5fefb
Merge pull request #138 from PoiScript/master
postgres: ipnetwork support
2020-03-20 09:54:43 -07:00