Skip to content

Commit

Permalink
Annotate Statement::complete_async with odbc 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
pacman82 committed Apr 4, 2023
1 parent b0c388f commit 4efbb4b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.56.1

* Fix: `Statement::complete_async` is now annotated to be only available in ODBC version 3.8. This missing annotation prevented compilation then specifying ODBC version 3.5.

## 0.56.0

* `CursorRow::get_variadic` is now private as it was always intended to be a private implemenatation detail.
Expand Down
2 changes: 1 addition & 1 deletion odbc-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "odbc-api"
version = "0.56.0"
version = "0.56.1"
authors = ["Markus Klein"]
edition = "2021"
license = "MIT"
Expand Down
6 changes: 5 additions & 1 deletion odbc-api/src/handles/statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@ use super::{
};
use odbc_sys::{
Desc, FreeStmtOption, HDbc, HStmt, Handle, HandleType, Len, ParamType, Pointer, SQLBindCol,
SQLBindParameter, SQLCloseCursor, SQLCompleteAsync, SQLDescribeParam, SQLExecute, SQLFetch,
SQLBindParameter, SQLCloseCursor, SQLDescribeParam, SQLExecute, SQLFetch,
SQLFreeStmt, SQLGetData, SQLMoreResults, SQLNumParams, SQLNumResultCols, SQLParamData,
SQLPutData, SQLRowCount, SqlDataType, SqlReturn, StatementAttribute, IS_POINTER,
};
use std::{ffi::c_void, marker::PhantomData, mem::ManuallyDrop, ptr::null_mut};

#[cfg(feature="odbc_version_3_80")]
use odbc_sys::SQLCompleteAsync;

#[cfg(feature = "narrow")]
use odbc_sys::{
SQLColAttribute as sql_col_attribute, SQLColumns as sql_columns,
Expand Down Expand Up @@ -882,6 +885,7 @@ pub trait Statement: AsHandle {
/// to notification mode) the driver manager has not notified the application.
///
/// See: <https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqlcompleteasync-function>
#[cfg(feature="odbc_version_3_80")]
fn complete_async(&mut self, function_name: &'static str) -> SqlResult<SqlResult<()>> {
let mut ret = SqlReturn::ERROR;
unsafe {
Expand Down
2 changes: 1 addition & 1 deletion odbcsv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ readme = "Readme.md"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
odbc-api = { version = "0.56.0", path = "../odbc-api" }
odbc-api = { version = "0.56.1", path = "../odbc-api" }
csv = "1.2.1"
anyhow = "1.0.70"
stderrlog = "0.5.4"
Expand Down

0 comments on commit 4efbb4b

Please sign in to comment.