Skip to content

Commit

Permalink
Changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
tyt2y3 committed Jan 10, 2023
1 parent 4210526 commit 23ee592
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
* Execute unprepared statements https://github.com/SeaQL/sea-orm/pull/1327
* Added `DatabaseConnection::execute_unprepared` method https://github.com/SeaQL/sea-orm/pull/1327
* Added `DatabaseTransaction::execute_unprepared` method https://github.com/SeaQL/sea-orm/pull/1327
* Added `Select::into_tuple` to select rows as tuples instead of having to define a custom Model https://github.com/SeaQL/sea-orm/pull/1311

### Enhancements

Expand Down Expand Up @@ -46,6 +47,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Breaking changes

* Added `ConnectionTrait::execute_unprepared` method https://github.com/SeaQL/sea-orm/pull/1327
* As part of https://github.com/SeaQL/sea-orm/pull/1311, the required method of `TryGetable` changed:
```rust
// then
fn try_get(res: &QueryResult, pre: &str, col: &str) -> Result<Self, TryGetError>;
// now; ColIdx can be `&str` or `usize`
fn try_get_by<I: ColIdx>(res: &QueryResult, index: I) -> Result<Self, TryGetError>;
```

## 0.10.6 - 2022-12-23

Expand Down
14 changes: 7 additions & 7 deletions src/executor/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,26 +133,26 @@ impl<T: TryGetable> TryGetable for Option<T> {
}
}

/// Column Index, used by [`TryGetable`]
/// Column Index, used by [`TryGetable`]. Implemented for `&str` and `usize`
pub trait ColIdx: std::fmt::Debug + Copy {
#[cfg(feature = "sqlx-mysql")]
/// Type shenanigans
/// Type surrogate
type SqlxMySqlIndex: sqlx::ColumnIndex<sqlx::mysql::MySqlRow>;
#[cfg(feature = "sqlx-postgres")]
/// Type shenanigans
/// Type surrogate
type SqlxPostgresIndex: sqlx::ColumnIndex<sqlx::postgres::PgRow>;
#[cfg(feature = "sqlx-sqlite")]
/// Type shenanigans
/// Type surrogate
type SqlxSqliteIndex: sqlx::ColumnIndex<sqlx::sqlite::SqliteRow>;

#[cfg(feature = "sqlx-mysql")]
/// Basically a no-op; only to satisfy a trait bound
/// Basically a no-op; only to satisfy trait bounds
fn as_sqlx_mysql_index(&self) -> Self::SqlxMySqlIndex;
#[cfg(feature = "sqlx-postgres")]
/// Basically a no-op; only to satisfy a trait bound
/// Basically a no-op; only to satisfy trait bounds
fn as_sqlx_postgres_index(&self) -> Self::SqlxPostgresIndex;
#[cfg(feature = "sqlx-sqlite")]
/// Basically a no-op; only to satisfy a trait bound
/// Basically a no-op; only to satisfy trait bounds
fn as_sqlx_sqlite_index(&self) -> Self::SqlxSqliteIndex;

/// Self must be `&str`, return `None` otherwise
Expand Down

0 comments on commit 23ee592

Please sign in to comment.