- Bumped
rusqlite
to 0.32.1 (sqlite 3.46.0)
- Added an
.insert_mut()
method that automatically updates therowid
. - Added a
migrations.toml
locked mode for CI, thanks @antifuchs in #40 for the idea!
- MSRV is now Rust 1.77
- Improved compatibility with
rust-analyzer
and improved error messages. - Correctly specify minimum dependency versions
- Bumped
rusqlite
to 0.31 (sqlite 3.45.0)
- 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
anddb_path
functions
- MSRV is now Rust 1.72
- Fixed incompatibility with array types and upcoming Rust 1.77
- Bumped
rusqlite
to 0.30 (sqlite 3.44.0)
- Allow selecting for
Option<primitive type>
andVec<primitive type>
. (#33, thanks @gmorenz!)
- In
select!
,Vec<u8>
is now interpreted as multiple rows ofu8
. Use the newtypeBlob
to select a single rowBLOB
result. - MSRV is now Rust 1.70
- Bumped
rusqlite
to 0.29 (sqlite 3.41.2) - Bumped
toml
to 0.7. This will cause non-semantic changes to yourmigrations.toml
. - Bumped
syn
to 2.
select!
andexecute!
macros now allow more concatenation options, and allow literal commas to appear outside of quotes.
- Fixed problem where
serde_json
had to be in user scope. - Improved compatibility with
rust-analyzer
.
- MSRV is now Rust 1.60
- Bumped
rusqlite
to 0.28
- 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 implementserde::Serialize
andserde::Deserialize
. This might synergize well with SQLite's built-in JSON support!
- Reworked Error/Result type.
- Bumped
rusqlite
to 0.27
- 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);
-
- 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.
- Bumped
rusqlite
to 0.26.3
- Removed
i54_
support. Try theturbocharger
crate, which supportsi64
/BigInt
via RPC. :)
- MSRV is now Rust 1.56
- New tables are created with SQLite 3.37's
STRICT
mode.
- Symlink
README.md
so crates.io published package works.
- Added
Turbosql
trait that represents the methods added by#[derive(Turbosql)]
. - Added
.update()
trait method. The row matching the caller'srowid
is updated; all fields are replaced in the database.
- MSRV is now Rust 1.54
- Some returned errors of type
anyhow::Error
have been changed toturbosql::TurbosqlError
.
- If no
migrations.toml
file exists in the project, an empty one will be created to prevent a cryptic error. :)
- Bumped
rusqlite
to 0.25
- Added support for struct fields of additional type:
f32
- e.g.
struct S { field_f32: Option<f32> }
- e.g.
- 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.
- Renamed
autogenerated_schema_for_your_information_do_not_edit
tooutput_generated_schema_for_your_information_do_not_edit
for smoother existence with auto-alphabetizingtoml
extensions. - Pretty-print the generated schema for smoother reading.
- Renamed the internal
turbosql_migrations
table to_turbosql_migrations
. It should be renamed automatically on existing.sqlite
databases.
- SQL comments (lines starting with
--
) are now always ignored when applying migrations, allowing you to make comments in yourmigrations.toml
and edit and move the comments around over time.
- Added ability to create a placeholder migration to "hint" Turbosql about the effect of a complex manual migration such as a column type change.
- Proc-macro error message for schema migration failures now includes the specific SQL statement that failed.
- Added support for
select!
directly into additional type:f64
- e.g.
select!(f64 "bayesian_probability FROM table")
- e.g.
.insert()
now returns correctrowid
instead of count of affected rows.
- Added support for
select!
directly into additional types:String
,i8
,u8
,i16
,u16
,i32
,u32
- e.g.
select!(String "post_title FROM table")
- e.g.
- Initial release! 🎉