odbc_ffi/
sqlreturn.rs

1/// Indicates the overall success or failure of the function
2///
3/// Each function in ODBC returns a code, known as its return code, which indicates the overall
4/// success or failure of the function. Program logic is generally based on return codes.
5/// See [ODBC reference](https://docs.microsoft.com/en-us/sql/odbc/reference/develop-app/return-codes-odbc)
6#[allow(non_camel_case_types)]
7#[repr(i16)]
8#[must_use]
9#[derive(Debug, PartialEq, Eq, Clone, Copy)]
10pub enum SQLRETURN {
11    /// Function failed due to an invalid environment, connection, statement, or descriptor handle
12    ///
13    /// This indicates a programming error. No additional information is available from
14    /// `SQLGetDiagRec` or `SQLGetDiagField`. This code is returned only when the handle is a null
15    /// pointer or is the wrong type, such as when a statement handle is passed for an argument a
16    /// connection handle.
17    SQL_INVALID_HANDLE = -2,
18
19    /// Function failed
20    ///
21    /// The application calls `SQLGetDiagRec` or `SQLGetDiagField` to retrieve additional
22    /// information. The contents of any output arguments to the function are undefined.
23    SQL_ERROR = -1,
24
25    /// Function completed successfully
26    ///
27    /// The application calls `SQLGetDiagField` to retrieve additional information from the header
28    /// record.
29    SQL_SUCCESS = 0,
30
31    /// Function completed successfully, possibly with a nonfatal error (warning)
32    ///
33    /// The application calls `SQLGetDiagRec` or `SQLGetDiagField` to retrieve additional
34    /// information.
35    SQL_SUCCESS_WITH_INFO = 1,
36
37    /// A function that was started asynchronously is still executing
38    ///
39    /// The application `SQLGetDiagRec` or `SQLGetDiagField` to retrieve additional information if
40    /// any.
41    SQL_STILL_EXECUTING = 2,
42
43    /// More data is needed
44    ///
45    /// ,such as when a parameter data is sent at execution time or additional connection
46    /// information is required. The application calls `SQLGetDiagRec` or `SQLGetDiagField` to
47    /// retrieve additional information, if any.
48    SQL_NEED_DATA = 99,
49
50    /// No more data was available
51    ///
52    /// The application calls `SQLGetDiagRec` or `SQLGetDiagField` to retrieve additional
53    /// information. One or more driver-defined status records in class 02xxx may be returned.
54    SQL_NO_DATA = 100,
55
56    #[cfg(feature = "odbc_version_3_80")]
57    SQL_PARAM_DATA_AVAILABLE = 101,
58}
59
60pub use self::SQLRETURN::*;