Skip to content

Commit

Permalink
drivers_buffer_fill returns SqlResult<()>
Browse files Browse the repository at this point in the history
  • Loading branch information
pacman82 committed Sep 26, 2022
1 parent f1c9cba commit c37869f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* `SqlResult` has now a new variant `SqlResult::NoData`.
* `SqlResult::into_result_with_trunaction_check` has been replaced by `SqlResult::into_result_with`.
* `handles::Environment::driver_connect` now returns `SqlResult<()>` instead of `SqlResult<bool>`.
* `handles::Environment::drivers_buffer_fill` now returns `SqlResult<()>` instead of `SqlResult<bool>`.
* `handles::Statement::fetch` now returns now returns `SqlResult<()>` instead of `SqlResult<bool>`.

### Non Breaking
Expand Down
2 changes: 1 addition & 1 deletion odbc-api/src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ impl Environment {
desc_buf.mut_buf(),
attr_buf.mut_buf(),
)
.into_result(&self.environment)?
.into_result_bool(&self.environment)?
{
let description = desc_buf.to_utf8();
let attributes = attr_buf.to_utf8();
Expand Down
8 changes: 4 additions & 4 deletions odbc-api/src/handles/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ impl Environment {
self.handle
}

/// List drivers descriptions and driver attribute keywords. Returns `None` to indicate the end
/// of the list.
/// List drivers descriptions and driver attribute keywords. Returns `NoData` to indicate the
/// end of the list.
///
/// # Safety
///
Expand Down Expand Up @@ -168,7 +168,7 @@ impl Environment {
direction: FetchOrientation,
buffer_description: &mut [SqlChar],
buffer_attributes: &mut [SqlChar],
) -> SqlResult<bool> {
) -> SqlResult<()> {
sql_drivers(
self.handle,
direction,
Expand All @@ -179,7 +179,7 @@ impl Environment {
buffer_attributes.len().try_into().unwrap(),
null_mut(),
)
.into_sql_result_bool("SQLDrivers")
.into_sql_result("SQLDrivers")
}

/// Use together with [`Environment::drivers_buffer_fill`] to list drivers descriptions and
Expand Down

0 comments on commit c37869f

Please sign in to comment.