Skip to content

Latest commit

 

History

History
225 lines (127 loc) · 5.92 KB

CHANGELOG.md

File metadata and controls

225 lines (127 loc) · 5.92 KB

Changelog

0.11.0 - 2024-07-28

Bumped

  • Bumped rusqlite to 0.32.1 (sqlite 3.46.0)

Added

  • Added an .insert_mut() method that automatically updates the rowid.
  • Added a migrations.toml locked mode for CI, thanks @antifuchs in #40 for the idea!

Changed

  • MSRV is now Rust 1.77

Fixed

  • Improved compatibility with rust-analyzer and improved error messages.
  • Correctly specify minimum dependency versions

0.10.0 - 2024-02-25

Bumped

  • Bumped rusqlite to 0.31 (sqlite 3.45.0)

Added

  • Added .delete() method (#36, thanks @PedroTurik!)
  • Added an update! macro
  • Parse result type in select! as a Type instead of Ident, allowing for more flexibility.
  • Added support for non-Option, NOT NULL types via SQL defaults.
  • Added now_µs and db_path functions

Changed

  • MSRV is now Rust 1.72

Fixed

  • Fixed incompatibility with array types and upcoming Rust 1.77

0.9.0 - 2023-11-15

Bumped

  • Bumped rusqlite to 0.30 (sqlite 3.44.0)

Added

  • Allow selecting for Option<primitive type> and Vec<primitive type>. (#33, thanks @gmorenz!)

Changed

  • In select!, Vec<u8> is now interpreted as multiple rows of u8. Use the newtype Blob to select a single row BLOB result.
  • MSRV is now Rust 1.70

0.8.0 - 2023-04-06

Bumped

  • Bumped rusqlite to 0.29 (sqlite 3.41.2)
  • Bumped toml to 0.7. This will cause non-semantic changes to your migrations.toml.
  • Bumped syn to 2.

Improved

  • select! and execute! macros now allow more concatenation options, and allow literal commas to appear outside of quotes.

Fixed

  • Fixed problem where serde_json had to be in user scope.
  • Improved compatibility with rust-analyzer.

Changed

  • MSRV is now Rust 1.60

0.7.0 - 2022-07-22

Bumped

  • Bumped rusqlite to 0.28

0.6.0 - 2022-06-23

Added

  • Added sqlite-compat-no-strict-tables feature, which allows easier compatibility with tools using a version of SQLite prior to 3.37. The downside is that some extra typechecking is disabled.
  • Allow selecting into Vec of primitive type, e.g. select!(Vec<String> "name FROM table").
  • struct fields with unrecognized types are now serialized/deserialized as JSON. These types must implement serde::Serialize and serde::Deserialize. This might synergize well with SQLite's built-in JSON support!

Changed

  • Reworked Error/Result type.

0.5.0 - 2022-03-05

Bumped

  • Bumped rusqlite to 0.27

Added

  • Added support for Vec<u8> and [u8; N] types.
  • Added a now_ms() convenience function for timestamps.
  • Added expression interpolation:
    • let name = "John";
      select!(Person "WHERE name = " name);

Fixed

  • Dependencies can also use Turbosql, and their tables will be added to your project's root migrations.toml.
  • Improved compatibility with rust-analyzer when proc-macro expansion is enabled.

0.4.0 - 2021-12-09

Bumped

  • Bumped rusqlite to 0.26.3

Removed

  • Removed i54_ support. Try the turbocharger crate, which supports i64/BigInt via RPC. :)

Changed

  • MSRV is now Rust 1.56
  • New tables are created with SQLite 3.37's STRICT mode.

0.3.1 - 2021-09-03

Fixed

  • Symlink README.md so crates.io published package works.

0.3.0 - 2021-09-03

Added

  • Added Turbosql trait that represents the methods added by #[derive(Turbosql)].
  • Added .update() trait method. The row matching the caller's rowid is updated; all fields are replaced in the database.

Changed

  • MSRV is now Rust 1.54
  • Some returned errors of type anyhow::Error have been changed to turbosql::TurbosqlError.

Fixed

  • If no migrations.toml file exists in the project, an empty one will be created to prevent a cryptic error. :)

0.2.0 - 2021-05-23

Bumped

  • Bumped rusqlite to 0.25

Added

  • Added support for struct fields of additional type: f32
    • e.g. struct S { field_f32: Option<f32> }

0.1.7 - 2021-03-02

Added

  • Added thread_local SQLite connections and support for transactions. See https://github.com/trevyn/turbosql#transactions-and-async
  • Added some extra table info to migrations.toml to give the proc macro more information to do its job.
  • Added turbosql::checkpoint() to perform a SQLite WAL checkpoint operation.

0.1.5 - 2021-02-18

Changed

  • Renamed autogenerated_schema_for_your_information_do_not_edit to output_generated_schema_for_your_information_do_not_edit for smoother existence with auto-alphabetizing toml extensions.
  • Pretty-print the generated schema for smoother reading.

0.1.4 - 2021-02-06

Internal

  • Renamed the internal turbosql_migrations table to _turbosql_migrations. It should be renamed automatically on existing .sqlite databases.

0.1.2 - 2021-02-06

Added

  • SQL comments (lines starting with --) are now always ignored when applying migrations, allowing you to make comments in your migrations.toml and edit and move the comments around over time.

0.1.1 - 2021-02-06

Added

  • Added ability to create a placeholder migration to "hint" Turbosql about the effect of a complex manual migration such as a column type change.

Improved

  • Proc-macro error message for schema migration failures now includes the specific SQL statement that failed.

0.1.0 - 2021-02-02

Added

  • Added support for select! directly into additional type: f64
    • e.g. select!(f64 "bayesian_probability FROM table")

Fixed

  • .insert() now returns correct rowid instead of count of affected rows.

0.0.3 - 2021-01-14

Added

  • Added support for select! directly into additional types: String, i8, u8, i16, u16, i32, u32
    • e.g. select!(String "post_title FROM table")

0.0.2 - 2021-01-12

  • Initial release! 🎉