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

0.3: Introduce life 🧬 into an otherwise static ⛰️ environment #111

Merged
merged 67 commits into from
Mar 15, 2020

Conversation

mehcode
Copy link
Member

@mehcode mehcode commented Feb 22, 2020

Do not worry about making your PR compatible with develop. After the dust settles here, we will integrate each PR into develop.


  • HasSqlType<T>: Database is now T: Type<Database> to mirror Encode and Decode
  • Row is now Row<'c> where 'c is bound to the lifetime of the Connection where the Row came from
  • Introduce a Cursor type that is now returned from Query::fetch(); this is simply a futures::Stream where the Item type is a higher-ranked trait bound so we can introduce a lifetime per iteration of the stream. Most usages should remain the same.
  • Executor is now implemented for &mut Connection and &Pool so hacks like &mut &Pool are no longer needed
  • Queries from the database are now zero-copy and no allocation beyond a shared read buffer for the TCP stream ( in other words, no per-query allocation )

  • TLS on Postgres is still unimplemented in the new protocol implementation (all the same code is there, just needs tied together)
  • Simple queries on postgres that return results
  • Macros are broken ( cue summoning the amazing @abonander )
  • Re-add support for query_as (merge old QueryAs with Query)
  • Support for MySQL ( I understand Postgres a lot more so it was easier for me to experiment in Postgres, but the same concepts should transfer to MySQL )
  • Postgres / UUID / Text
  • Postgres / Chrono / Text

@mehcode mehcode added this to the 0.3 milestone Feb 22, 2020
@abonander
Copy link
Collaborator

abonander commented Feb 27, 2020

@mehcode you should be able to fast-forward merge to ab/dev-fixes which fixes macros and reintroduces query_as(): 66edfed

@abonander abonander changed the title Introduce life 🧬 into an otherwise static environment 0.3: Introduce life 🧬 into an otherwise static environment Mar 3, 2020
@abonander abonander changed the title 0.3: Introduce life 🧬 into an otherwise static environment 0.3: Introduce life 🧬 into an otherwise static ⛰️ environment Mar 3, 2020
@abonander abonander force-pushed the develop branch 4 times, most recently from 2731838 to ea2af23 Compare March 4, 2020 20:59
abonander added a commit that referenced this pull request Mar 6, 2020
@abonander abonander force-pushed the develop branch 2 times, most recently from 918a4f8 to 15369c9 Compare March 6, 2020 03:20
@mehcode mehcode marked this pull request as ready for review March 11, 2020 08:42
mehcode and others added 12 commits March 11, 2020 01:42
 * this breaks a lot internally as-is
 * mysql needs a restructure
 * 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
@mehcode
Copy link
Member Author

mehcode commented Mar 11, 2020

@abonander This should be good to go ( tests pass locally ). Any idea why CI is crapping out?

     Running target/debug/deps/ui_tests-339cabbe753a12df

running 1 test
error: failed to download `quote v1.0.3`

Caused by:
  can't make HTTP request in the offline mode
test ui_tests ... FAILED

failures:

---- ui_tests stdout ----
thread 'ui_tests' panicked at 'tests failed', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/trybuild-1.0.23/src/run.rs:38:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

@abonander
Copy link
Collaborator

@abonander abonander force-pushed the develop branch 2 times, most recently from 5fca584 to f1f8822 Compare March 11, 2020 20:20
@mehcode mehcode merged commit d269506 into master Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants