1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Copyright 2025 Stoolap Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! C FFI layer for Stoolap
//!
//! Provides a C API with opaque handles, step-based iteration,
//! and per-handle error storage. Enable with `--features ffi`.
//!
//! Build: `cargo build --release --features ffi` produces `libstoolap.{so,dylib,dll}`
// Re-export all extern "C" functions
pub use *;
pub use *;
pub use *;
pub use *;
pub use ;
// Status codes
pub const STOOLAP_OK: i32 = 0;
pub const STOOLAP_ERROR: i32 = 1;
pub const STOOLAP_ROW: i32 = 100;
pub const STOOLAP_DONE: i32 = 101;
// Value type codes (match DataType repr(u8))
pub const STOOLAP_TYPE_NULL: i32 = 0;
pub const STOOLAP_TYPE_INTEGER: i32 = 1;
pub const STOOLAP_TYPE_FLOAT: i32 = 2;
pub const STOOLAP_TYPE_TEXT: i32 = 3;
pub const STOOLAP_TYPE_BOOLEAN: i32 = 4;
pub const STOOLAP_TYPE_TIMESTAMP: i32 = 5;
pub const STOOLAP_TYPE_JSON: i32 = 6;
pub const STOOLAP_TYPE_BLOB: i32 = 7;
// Isolation levels (match IsolationLevel repr)
pub const STOOLAP_ISOLATION_READ_COMMITTED: i32 = 0;
pub const STOOLAP_ISOLATION_SNAPSHOT: i32 = 1;