diff --git a/History.md b/History.md index bfe5397..3ae8488 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,11 @@ -# Release History for nim-kuzu +# Release History for nim-ladybug + +--- +## v0.7.0 [2025-11-04] Mahlon E. Smith + +Rename the project from Kuzu to Ladybug, following new upstream efforts to keep +the project going after the Kuzu originator sudden abandonment. + --- ## v0.6.1 [2025-07-19] Mahlon E. Smith diff --git a/README.md b/README.md index ec7b362..c487bb0 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,18 @@ -# Nim Kuzu +# Nim Ladybug home -: https://code.martini.nu/mahlon/nim-kuzu +: https://code.martini.nu/mahlon/nim-ladybug github_mirror -: https://github.com/mahlonsmith/nim-kuzu +: https://github.com/mahlonsmith/nim-ladybug ## Description -This is a Nim binding for the [Kuzu](https://kuzudb.com) graph database library. +This is a Nim binding for the [LadybugDB](https://ladybugdb.com) graph database library. -Kuzu is an embedded graph database built for query speed and scalability. It is +Ladybug is an embedded graph database built for query speed and scalability. It is optimized for handling complex join-heavy analytical workloads on very large graphs, with the following core feature set: @@ -25,22 +25,21 @@ graphs, with the following core feature set: - Multi-core query parallelism - Serializable ACID transactions -For more information about Kuzu itself, see its -[documentation](https://docs.kuzudb.com/). +For more information about Ladybug itself, see its +[documentation](https://docs.ladybugdb.com/). ## Prerequisites * A functioning Nim >= 2 installation -- [KuzuDB](https://kuzudb.com) to be locally installed! +- [LadybugDB](https://ladybugdb.com) to be locally installed! ## Installation - $ nimble install kuzu + $ nimble install ladybug -The current version of this library is built for Kuzu v0.11.3, which sadly -seems may have been the final release of kuzudb. :( +The current version of this library is built for Ladybug v0.12.0. ## Usage @@ -53,11 +52,11 @@ You can also find a bunch of working examples in the tests. ## Contributing You can check out the current development source via Git/Jujutsu at its -[home repo](https://code.martini.nu/mahlon/nim-kuzu), or the -[project mirror](https://github.com/mahlonsmith/nim-kuzu). +[home repo](https://code.martini.nu/mahlon/nim-ladybug), or the +[project mirror](https://github.com/mahlonsmith/nim-ladybug). After checking out the source, uncomment the development dependencies -from the `kuzu.nimble` file, and run: +from the `ladybug.nimble` file, and run: $ nimble setup @@ -71,4 +70,5 @@ development. - Mahlon E. Smith A note of thanks to @mantielero on Github, who has a Kuzu binding for an early -KuzuDB (0.4.x) that I found after starting this project. +KuzuDB (0.4.x) that I found after starting this project (the predecessor to +LadybugDB.) diff --git a/USAGE.md b/USAGE.md index 23f7682..d4dffe5 100644 --- a/USAGE.md +++ b/USAGE.md @@ -12,24 +12,28 @@ a lot and it's hard to know where to start. ## Prior Reading -If you're just starting with Kuzu or graph databases, it's probably a good idea -to familiarize yourself with the [Kuzu Documentation](https://docs.kuzudb.com/) -and the [Cypher Language](https://docs.kuzudb.com/tutorials/cypher/). This -library won't do much for you by itself without a basic understanding of Kuzu usage. +If you're just starting with Ladybug or graph databases, it's probably a good idea +to familiarize yourself with the [Ladybug Documentation](https://docs.ladybugdb.com/) +and the [Cypher Language](https://docs.ladybugdb.com/tutorials/cypher/). This +library won't do much for you by itself without a basic understanding of Ladybug usage. ## Checking Compatibility -This is a wrapper (with some additional niceties) for the system-installed Kuzu +This is a wrapper (with some additional niceties) for the system-installed Ladybug shared library. As such, the version of this library might not match with what you currently have installed. Check the [README](README.md), the [History](History.md), and the following -table to ensure you're using the correct version for your Kuzu -installation. I'll make a modest effort for backwards compatibility while Kuzu +table to ensure you're using the correct version for your Ladybug +installation. I'll make a modest effort for backwards compatibility while Ladybug is pre 1.0, and in practice, mismatched versions *might* work. Don't count too heavily on it. :-) Once there's a 1.0, this should be less chaotic. +Ladybug was continued from the KuzuDB project, which was hastily abandoned in +October of 2025. Previous versions used a "Kuzu" namespace. + + | Kuzu Library Version | Nim Kuzu Minimum Version | | -------------------- | ------------------------ | | v0.8.2 | v0.1.0 | @@ -37,34 +41,49 @@ heavily on it. :-) Once there's a 1.0, this should be less chaotic. | v0.10.0 | v0.4.0 | | v0.11.0 | v0.5.0 | -You can use the `kuzuVersionCompatible()` function (along with the -`kuzuGetVersion()` and the `KUZU_VERSION` constant) to quickly check if things + +| Ladybug Library Version | Nim Ladybug Minimum Version | +| ----------------------- | --------------------------- | +| v0.12.0 | v0.7.0 | + + +You can use the `lbugVersionCompatible()` function (along with the +`lbugGetVersion()` and the `LBUG_VERSION` constant) to quickly check if things are looking right. ```nim -import kuzu +import ladybug -echo KUZU_VERSION #=> "0.1.0" -echo kuzuGetVersion() #=> "0.8.2" -echo kuzuVersionCompatible() #=> true +echo LBUG_VERSION #=> "0.7.0" +echo lbugGetVersion() #=> "0.12.0" +echo lbugVersionCompatible() #=> true ``` +## Namespace + +The LadybugDB project internals are all prefixed with `lbug`. This wrapper +follows suit. + +An exception to that is the import. You can import "ladybug" or "lbug", it's +functionally equivalent. + + ## Connecting to a Database -Just call `newKuzuDatabase()`. Without an argument (or with an empty string), +Just call `newLbugDatabase()`. Without an argument (or with an empty string), the database is in-memory. Any other argument is considered a filesystem path -- it will create an empty database if the path is currently non-existent, or open an existing database otherwise. ```nim # "db" is in-memory and will evaporate when the process ends. -var db = newKuzuDatabase() +var db = newLbugDatabase() ``` ```nim # "db" is persistent, stored in the file "data.kz". -var db = newKuzuDatabase("data.kz") +var db = newLbugDatabase("data.kz") ``` The database path is retained, and can be recalled via `db.path`. @@ -86,19 +105,19 @@ if db.config.enable_compression: echo "Yes!" ``` -You can alter configuration options when connecting by passing a `kuzuConfig` -object as the second argument to `newKuzuDatabase()`: +You can alter configuration options when connecting by passing a `lbugConfig` +object as the second argument to `newLbugDatabase()`: ```nim # Open a readonly handle. -var db = newKuzuDatabase( "data.kz", kuzuConfig( read_only=true ) ) +var db = newLbugDatabase( "data.kz", lbugConfig( read_only=true ) ) ``` ### The Connection All interaction with the database is performed via a connection object. There are limitations to database handles and connection objects -- see the -[Kuzu Concurrency](https://docs.kuzudb.com/concurrency/) docs for details! +[Lbug Concurrency](https://docs.ladybugdb.com/concurrency/) docs for details! Call `connect` on an open database handle to create a new connection: @@ -121,10 +140,10 @@ conn.queryInterrupt() You can perform a basic query via the appropriately named `query()` function on the connection. Via this method, queries are run immediately. A -`KuzuQueryResult` is returned - this is the object you'll be interacting with to +`LbugQueryResult` is returned - this is the object you'll be interacting with to see results. -A `KuzuQueryResult` can be turned into a string to quickly see the column +A `LbugQueryResult` can be turned into a string to quickly see the column headers and all tuple results: ```nim @@ -154,7 +173,7 @@ echo res.execution_time #=> 1.624 assert res.column_names == @["hi", "pin", "list"] # Return the column data types as a sequence. -assert res.column_types == @[KUZU_STRING, KUZU_INT64, KUZU_LIST] +assert res.column_types == @[LBUG_STRING, LBUG_INT64, LBUG_LIST] ``` ### Prepared Statements @@ -172,7 +191,7 @@ RETURN [1,2,3] AS list """ -# This returns a KuzuQueryResult, just like `conn.query()`. +# This returns a LbugQueryResult, just like `conn.query()`. var res = stmt.execute() ``` @@ -198,13 +217,13 @@ echo $res #=> #### Type Conversion When binding variables to a prepared statement, most Nim types are automatically -converted to their respective Kuzu types. +converted to their respective Ladybug types. ```nim var stmt = conn.prepare( """RETURN $num AS num""" ) var res = stmt.execute( (num: 12) ) -assert res.column_types[0] == KUZU_INT32 +assert res.column_types[0] == LBUG_INT32 ``` This might not necessarily be what you want - sometimes you'd rather be strict @@ -215,37 +234,37 @@ You can use [integer type suffixes](https://nim-lang.org/docs/manual.html#lexica ```nim var stmt = conn.prepare( """RETURN $num AS num""" ) -var res: KuzuQueryResult +var res: LbugQueryResult res = stmt.execute( (num: 12'u64) ) -assert res.column_types[0] == KUZU_UINT64 +assert res.column_types[0] == LBUG_UINT64 res = stmt.execute( (num: 12.float) ) -assert res.column_types[0] == KUZU_DOUBLE +assert res.column_types[0] == LBUG_DOUBLE ``` -#### Kuzu Specific Types +#### Ladybug Specific Types In the example above, you may have noticed the `LIST_CREATION($list)` in the prepared query, and that we passed a string `1,2,3` as the `$list` parameter. -This is a useful way to easily use most Kuzu types without needing corresponding +This is a useful way to easily use most Ladybug types without needing corresponding Nim ones -- if you're inserting into a table that is using a custom type, you can cast it using the query itself during insertion! -This has the additional advantage of letting Kuzu error check the validity of +This has the additional advantage of letting Ladybug error check the validity of the content, and it works with the majority of types. An extended example: ```nim import std/sequtils -import kuzu +import lbug -var db = newKuzuDatabase() +var db = newLbugDatabase() var conn = db.connect -var res: KuzuQueryResult +var res: LbugQueryResult # Create a node table. # @@ -277,7 +296,7 @@ CREATE (e:Example { }) """ -# Add a node row that contains specific Kuzu types. +# Add a node row that contains specific Ladybug types. # res = stmt.execute(( num: 2, @@ -295,26 +314,26 @@ echo $res #=> # e.id|e.num|e.done|e.comment|e.karma|e.thing|e.created|e.activity # 0|2|True|Types!|16.700000|e0e7232e-bec9-4625-9822-9d1a31ea6f93|2025-03-29|2025-03-29 00:00:00 -# Show column names and their Kuzu types. +# Show column names and their Ladybug types. for pair in res.column_names.zip( res.column_types ): echo pair #=> - # ("e.id", KUZU_SERIAL) - # ("e.num", KUZU_UINT8) - # ("e.done", KUZU_BOOL) - # ("e.comment", KUZU_STRING) - # ("e.karma", KUZU_DOUBLE) - # ("e.thing", KUZU_UUID) - # ("e.created", KUZU_DATE) - # ("e.activity", KUZU_TIMESTAMP) + # ("e.id", LBUG_SERIAL) + # ("e.num", LBUG_UINT8) + # ("e.done", LBUG_BOOL) + # ("e.comment", LBUG_STRING) + # ("e.karma", LBUG_DOUBLE) + # ("e.thing", LBUG_UUID) + # ("e.created", LBUG_DATE) + # ("e.activity", LBUG_TIMESTAMP) ``` ## Reading Results -So far we've just been showing values by converting the entire `KuzuQueryResult` +So far we've just been showing values by converting the entire `LbugQueryResult` to a string. Convenient for quick examples and debugging, but not much else. -A `KuzuQueryResult` is an iterator. You can use regular Nim functions that yield -each `KuzuFlatTuple` -- essentially, each row that was returned in a result set. +A `LbugQueryResult` is an iterator. You can use regular Nim functions that yield +each `LbugFlatTuple` -- essentially, each row that was returned in a result set. ```nim var res = conn.query """ @@ -323,7 +342,7 @@ var res = conn.query """ RETURN items, thing """ -# KuzuFlatTuple can be stringified just like the result set. +# LbugFlatTuple can be stringified just like the result set. for row in res: echo row #=> # 1|thing @@ -333,7 +352,7 @@ for row in res: Once iteration has reached the end, it is automatically rewound for reuse. -You can manually get the next `KuzuFlatTuple` via `getNext()`. Calling +You can manually get the next `LbugFlatTuple` via `getNext()`. Calling `getNext()` after the last row results in an error. Use `hasNext()` to check before calling. @@ -350,23 +369,23 @@ if res.hasNext: echo res.getNext #=> 2 echo res.getNext #=> 3 -echo res.getNext #=> KuzuIterationError exception! +echo res.getNext #=> LbugIterationError exception! ``` -Manually rewind the `KuzuQueryResult` via `rewind()`. +Manually rewind the `LbugQueryResult` via `rewind()`. ## Multiple Query Results A query can potentially return any number of separate statements. In the case of more potential `RETURN`s, the query will only contain the first. Iterate -over linked `KuzuQueryResult` objects with the `sets()` iterator to retreive the +over linked `LbugQueryResult` objects with the `sets()` iterator to retreive the remaining: ```nim -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect let query = conn.query """ @@ -400,8 +419,8 @@ for set in query.sets: ## Working with Values -A `KuzuFlatTuple` contains the entire row. You can index a value at its column -position, returning a `KuzuValue`. +A `LbugFlatTuple` contains the entire row. You can index a value at its column +position, returning a `LbugValue`. ```nim var res = conn.query """ @@ -419,27 +438,27 @@ var row = res.getNext for idx in ( 0 .. res.num_columns-1 ): var value = row[idx] echo res.column_names[idx], ": ", value, " (", value.kind, ")" #=> - # num: 1 (KUZU_INT64) - # done: True (KUZU_BOOL) - # comment: A comment (KUZU_STRING) - # karma: 12.840000 (KUZU_DOUBLE) - # thing: b41deae0-dddf-430b-981d-3fb93823e495 (KUZU_UUID) - # created: 2025-03-29 (KUZU_DATE) + # num: 1 (LBUG_INT64) + # done: True (LBUG_BOOL) + # comment: A comment (LBUG_STRING) + # karma: 12.840000 (LBUG_DOUBLE) + # thing: b41deae0-dddf-430b-981d-3fb93823e495 (LBUG_UUID) + # created: 2025-03-29 (LBUG_DATE) ``` ### Types -A `KuzuValue` can always be stringified, irrespective of its Kuzu type. You can +A `LbugValue` can always be stringified, irrespective of its Lbug type. You can check what type it is via the 'kind' property. ```nim var res = conn.query """RETURN "hello"""" var value = res.getNext[0] -assert value.kind == KUZU_STRING +assert value.kind == LBUG_STRING ``` -A `KuzuValue` has conversion methods for Nim base types. You'll likely want to +A `LbugValue` has conversion methods for Nim base types. You'll likely want to convert it for regular Nim usage: ```nim @@ -455,12 +474,12 @@ assert value.toInt64 + 1 == 2561 ### Lists -A `KuzuValue` of type `KUZU_LIST` can be converted to a Nim sequence of -`KuzuValues` with the `toList()` function: +A `LbugValue` of type `LBUG_LIST` can be converted to a Nim sequence of +`LbugValues` with the `toList()` function: ```nim import std/sequtils -import kuzu +import lbug var res = conn.query """ RETURN [10, 20, 30] @@ -471,16 +490,16 @@ var value = res.getNext[0] var list = value.toList echo list #=> @[10,20,30] -echo list.map( func(v:KuzuValue): int = v.toInt64 * 10 ) #=> @[100,200,300] +echo list.map( func(v:LbugValue): int = v.toInt64 * 10 ) #=> @[100,200,300] ``` ### Struct-like Objects -Various Kuzu types can act like a struct - this includes `KUZU_NODE`, -`KUZU_REL`, and of course an explicit `KUZU_STRUCT` itself, among others. +Various Ladybug types can act like a struct - this includes `LBUG_NODE`, +`LBUG_REL`, and of course an explicit `LBUG_STRUCT` itself, among others. -Convert a `KuzuValue` to a `KuzuStructValue` with `toStruct()`. For +Convert a `LbugValue` to a `LbugStructValue` with `toStruct()`. For convenience, this is also aliased to `toNode()` and `toRel()`. Once converted, you can access struct values by passing the key name to `[]`: @@ -503,9 +522,9 @@ Here's a more elaborate example, following a node path: import std/sequtils, std/strformat -import kuzu +import lbug -var db = newKuzuDatabase() +var db = newLbugDatabase() var conn = db.connect var res = conn.query """ @@ -540,7 +559,7 @@ res = conn.query """ # for row in res: var since = row[0] - var people = row[1].toList.map( proc(p:KuzuValue):KuzuStructValue = p.toNode ) + var people = row[1].toList.map( proc(p:LbugValue):LbugStructValue = p.toNode ) echo &"""{people[0]["name"]} has known {people[1]["name"]} since {since}.""" #=> # Bob has known Bruce since 2003. # Bob has known Alice since 2009. @@ -550,7 +569,7 @@ for row in res: ### Blobs -Kuzu can store small chunks of opaque binary data. For these BLOB columns, +Ladybug can store small chunks of opaque binary data. For these BLOB columns, using `toBlob` will return the raw sequence of bytes. ```nim diff --git a/kuzu.nimble b/ladybug.nimble similarity index 73% rename from kuzu.nimble rename to ladybug.nimble index 448b6aa..28551d4 100644 --- a/kuzu.nimble +++ b/ladybug.nimble @@ -1,8 +1,8 @@ # vim: set et sta sw=4 ts=4 : -version = "0.6.1" +version = "0.7.0" author = "Mahlon E. Smith" -description = "Kuzu is an embedded graph database built for query speed and scalability." +description = "Ladybug is an embedded graph database built for query speed and scalability." license = "BSD-3-Clause" srcDir = "src" @@ -13,7 +13,7 @@ requires "nim ^= 2.0.0" #requires "zip ^= 0.3.1" task makewrapper, "Generate the C wrapper using Futhark": - exec "nim c -d:futharkWrap --outdir=tmp/ src/kuzu.nim" + exec "nim c -d:futharkWrap --outdir=tmp/ src/lbug.nim" task test, "Run the test suite.": exec "testament --megatest:off all" @@ -24,5 +24,5 @@ task docs, "Generate automated documentation.": exec "nim md2html --project --outdir:docs README.md" exec "nim md2html --project --outdir:docs History.md" exec "nim md2html --project --outdir:docs USAGE.md" - exec "nim doc --project --outdir:docs src/kuzu.nim" + exec "nim doc --project --outdir:docs src/ladybug.nim" diff --git a/src/kuzu.nim b/src/kuzu.nim deleted file mode 100644 index b82e921..0000000 --- a/src/kuzu.nim +++ /dev/null @@ -1,49 +0,0 @@ -# vim: set et sta sw=4 ts=4 : -# - -{.passL:"-lkuzu".} - -when defined( futharkWrap ): - import futhark, os - - importc: - outputPath currentSourcePath.parentDir / "kuzu" / "0.11.3.nim" - "kuzu.h" -else: - include "kuzu/0.11.3.nim" - -import - std/files, - std/paths, - std/strformat, - std/strutils - -# Order very much matters here pre Nim 3.0 multi-pass compiling. -include - "kuzu/constants.nim", - "kuzu/types.nim", - "kuzu/config.nim", - "kuzu/database.nim", - "kuzu/connection.nim", - "kuzu/value.nim", - "kuzu/tuple.nim", - "kuzu/queries.nim" - - -proc kuzuVersionCompatible*(): bool = - ## Returns true if the system installed Kuzu library - ## is the expected version of this library wrapper. - result = KUZU_EXPECTED_LIBVERSION == $kuzuGetVersion() - - -when isMainModule: - echo "Nim-Kuzu version: ", KUZU_VERSION, - ". Expected library version: ", KUZU_EXPECTED_LIBVERSION, "." - echo "Installed Kuzu library version ", kuzuGetVersion(), - " (storage version ", kuzuGetStorageVersion(), ")" - if kuzuVersionCompatible(): - echo "Versions match!" - else: - echo "This library wraps a different version of Kuzu than what is installed." - echo "Behavior may be unexpected!" - diff --git a/src/kuzu/0.11.3.nim b/src/kuzu/0.11.3.nim deleted file mode 100644 index aa5444b..0000000 --- a/src/kuzu/0.11.3.nim +++ /dev/null @@ -1,2168 +0,0 @@ - -{.warning[UnusedImport]: off.} -{.hint[XDeclaredButNotUsed]: off.} -from macros import hint, warning, newLit, getSize - -from os import parentDir - -when not declared(ownSizeOf): - macro ownSizeof(x: typed): untyped = - newLit(x.getSize) - -type - enum_kuzu_data_type_id_570425857* {.size: sizeof(cuint).} = enum - KUZU_ANY = 0, KUZU_NODE = 10, KUZU_REL = 11, KUZU_RECURSIVE_REL = 12, - KUZU_SERIAL = 13, KUZU_BOOL = 22, KUZU_INT64 = 23, KUZU_INT32 = 24, - KUZU_INT16 = 25, KUZU_INT8 = 26, KUZU_UINT64 = 27, KUZU_UINT32 = 28, - KUZU_UINT16 = 29, KUZU_UINT8 = 30, KUZU_INT128 = 31, KUZU_DOUBLE = 32, - KUZU_FLOAT = 33, KUZU_DATE = 34, KUZU_TIMESTAMP = 35, - KUZU_TIMESTAMP_SEC = 36, KUZU_TIMESTAMP_MS = 37, KUZU_TIMESTAMP_NS = 38, - KUZU_TIMESTAMP_TZ = 39, KUZU_INTERVAL = 40, KUZU_DECIMAL = 41, - KUZU_INTERNAL_ID = 42, KUZU_STRING = 50, KUZU_BLOB = 51, KUZU_LIST = 52, - KUZU_ARRAY = 53, KUZU_STRUCT = 54, KUZU_MAP = 55, KUZU_UNION = 56, - KUZU_POINTER = 58, KUZU_UUID = 59 -type - enum_kuzu_state_570425861* {.size: sizeof(cuint).} = enum - KuzuSuccess = 0, KuzuError = 1 -when not declared(KUZU_HELPER_DLL_IMPORT): - type - KUZU_HELPER_DLL_IMPORT* = object -else: - static : - hint("Declaration of " & "KUZU_HELPER_DLL_IMPORT" & - " already exists, not redeclaring") -when not declared(KUZU_HELPER_DEPRECATED): - type - KUZU_HELPER_DEPRECATED* = object -else: - static : - hint("Declaration of " & "KUZU_HELPER_DEPRECATED" & - " already exists, not redeclaring") -type - struct_ArrowSchema_570425781 {.pure, inheritable, bycopy.} = object - format*: cstring ## Generated based on /usr/include/kuzu.h:64:8 - name*: cstring - metadata*: cstring - flags*: int64 - n_children*: int64 - children*: ptr ptr struct_ArrowSchema_570425782 - dictionary*: ptr struct_ArrowSchema_570425782 - release*: proc (a0: ptr struct_ArrowSchema_570425782): void {.cdecl.} - private_data*: pointer - struct_ArrowArray_570425783 {.pure, inheritable, bycopy.} = object - length*: int64 ## Generated based on /usr/include/kuzu.h:80:8 - null_count*: int64 - offset*: int64 - n_buffers*: int64 - n_children*: int64 - buffers*: ptr pointer - children*: ptr ptr struct_ArrowArray_570425784 - dictionary*: ptr struct_ArrowArray_570425784 - release*: proc (a0: ptr struct_ArrowArray_570425784): void {.cdecl.} - private_data*: pointer - struct_kuzu_system_config_570425785 {.pure, inheritable, bycopy.} = object - buffer_pool_size*: uint64 ## Generated based on /usr/include/kuzu.h:112:9 - max_num_threads*: uint64 - enable_compression*: bool - read_only*: bool - max_db_size*: uint64 - auto_checkpoint*: bool - checkpoint_threshold*: uint64 - kuzu_system_config_570425787 = struct_kuzu_system_config_570425786 ## Generated based on /usr/include/kuzu.h:141:3 - struct_kuzu_database_570425789 {.pure, inheritable, bycopy.} = object - internal_database*: pointer ## Generated based on /usr/include/kuzu.h:146:9 - kuzu_database_570425791 = struct_kuzu_database_570425790 ## Generated based on /usr/include/kuzu.h:148:3 - struct_kuzu_connection_570425793 {.pure, inheritable, bycopy.} = object - internal_connection*: pointer ## Generated based on /usr/include/kuzu.h:155:9 - kuzu_connection_570425795 = struct_kuzu_connection_570425794 ## Generated based on /usr/include/kuzu.h:157:3 - struct_kuzu_prepared_statement_570425797 {.pure, inheritable, bycopy.} = object - internal_prepared_statement*: pointer ## Generated based on /usr/include/kuzu.h:163:9 - internal_bound_values*: pointer - kuzu_prepared_statement_570425799 = struct_kuzu_prepared_statement_570425798 ## Generated based on /usr/include/kuzu.h:166:3 - struct_kuzu_query_result_570425801 {.pure, inheritable, bycopy.} = object - internal_query_result*: pointer ## Generated based on /usr/include/kuzu.h:171:9 - internal_is_owned_by_cpp*: bool - kuzu_query_result_570425803 = struct_kuzu_query_result_570425802 ## Generated based on /usr/include/kuzu.h:174:3 - struct_kuzu_flat_tuple_570425805 {.pure, inheritable, bycopy.} = object - internal_flat_tuple*: pointer ## Generated based on /usr/include/kuzu.h:179:9 - internal_is_owned_by_cpp*: bool - kuzu_flat_tuple_570425807 = struct_kuzu_flat_tuple_570425806 ## Generated based on /usr/include/kuzu.h:182:3 - struct_kuzu_logical_type_570425809 {.pure, inheritable, bycopy.} = object - internal_data_type*: pointer ## Generated based on /usr/include/kuzu.h:187:9 - kuzu_logical_type_570425811 = struct_kuzu_logical_type_570425810 ## Generated based on /usr/include/kuzu.h:189:3 - struct_kuzu_value_570425813 {.pure, inheritable, bycopy.} = object - internal_value*: pointer ## Generated based on /usr/include/kuzu.h:194:9 - internal_is_owned_by_cpp*: bool - kuzu_value_570425815 = struct_kuzu_value_570425814 ## Generated based on /usr/include/kuzu.h:197:3 - struct_kuzu_internal_id_t_570425817 {.pure, inheritable, bycopy.} = object - table_id*: uint64 ## Generated based on /usr/include/kuzu.h:202:9 - offset*: uint64 - kuzu_internal_id_t_570425819 = struct_kuzu_internal_id_t_570425818 ## Generated based on /usr/include/kuzu.h:205:3 - struct_kuzu_date_t_570425821 {.pure, inheritable, bycopy.} = object - days*: int32 ## Generated based on /usr/include/kuzu.h:210:9 - kuzu_date_t_570425823 = struct_kuzu_date_t_570425822 ## Generated based on /usr/include/kuzu.h:213:3 - struct_kuzu_timestamp_ns_t_570425825 {.pure, inheritable, bycopy.} = object - value*: int64 ## Generated based on /usr/include/kuzu.h:219:9 - kuzu_timestamp_ns_t_570425827 = struct_kuzu_timestamp_ns_t_570425826 ## Generated based on /usr/include/kuzu.h:222:3 - struct_kuzu_timestamp_ms_t_570425829 {.pure, inheritable, bycopy.} = object - value*: int64 ## Generated based on /usr/include/kuzu.h:228:9 - kuzu_timestamp_ms_t_570425831 = struct_kuzu_timestamp_ms_t_570425830 ## Generated based on /usr/include/kuzu.h:231:3 - struct_kuzu_timestamp_sec_t_570425833 {.pure, inheritable, bycopy.} = object - value*: int64 ## Generated based on /usr/include/kuzu.h:237:9 - kuzu_timestamp_sec_t_570425835 = struct_kuzu_timestamp_sec_t_570425834 ## Generated based on /usr/include/kuzu.h:240:3 - struct_kuzu_timestamp_tz_t_570425837 {.pure, inheritable, bycopy.} = object - value*: int64 ## Generated based on /usr/include/kuzu.h:246:9 - kuzu_timestamp_tz_t_570425839 = struct_kuzu_timestamp_tz_t_570425838 ## Generated based on /usr/include/kuzu.h:249:3 - struct_kuzu_timestamp_t_570425841 {.pure, inheritable, bycopy.} = object - value*: int64 ## Generated based on /usr/include/kuzu.h:255:9 - kuzu_timestamp_t_570425843 = struct_kuzu_timestamp_t_570425842 ## Generated based on /usr/include/kuzu.h:258:3 - struct_kuzu_interval_t_570425845 {.pure, inheritable, bycopy.} = object - months*: int32 ## Generated based on /usr/include/kuzu.h:263:9 - days*: int32 - micros*: int64 - kuzu_interval_t_570425847 = struct_kuzu_interval_t_570425846 ## Generated based on /usr/include/kuzu.h:267:3 - struct_kuzu_query_summary_570425849 {.pure, inheritable, bycopy.} = object - internal_query_summary*: pointer ## Generated based on /usr/include/kuzu.h:273:9 - kuzu_query_summary_570425851 = struct_kuzu_query_summary_570425850 ## Generated based on /usr/include/kuzu.h:275:3 - struct_kuzu_int128_t_570425853 {.pure, inheritable, bycopy.} = object - low*: uint64 ## Generated based on /usr/include/kuzu.h:277:9 - high*: int64 - kuzu_int128_t_570425855 = struct_kuzu_int128_t_570425854 ## Generated based on /usr/include/kuzu.h:280:3 - kuzu_data_type_id_570425859 = enum_kuzu_data_type_id_570425858 ## Generated based on /usr/include/kuzu.h:325:3 - kuzu_state_570425863 = enum_kuzu_state_570425862 ## Generated based on /usr/include/kuzu.h:330:49 - struct_tm_570425865 {.pure, inheritable, bycopy.} = object - tm_sec*: cint ## Generated based on /usr/include/bits/types/struct_tm.h:7:8 - tm_min*: cint - tm_hour*: cint - tm_mday*: cint - tm_mon*: cint - tm_year*: cint - tm_wday*: cint - tm_yday*: cint - tm_isdst*: cint - tm_gmtoff*: clong - tm_zone*: cstring - struct_kuzu_prepared_statement_570425798 = (when declared( - struct_kuzu_prepared_statement): - when ownSizeof(struct_kuzu_prepared_statement) != - ownSizeof(struct_kuzu_prepared_statement_570425797): - static : - warning("Declaration of " & "struct_kuzu_prepared_statement" & - " exists but with different size") - struct_kuzu_prepared_statement - else: - struct_kuzu_prepared_statement_570425797) - kuzu_flat_tuple_570425808 = (when declared(kuzu_flat_tuple): - when ownSizeof(kuzu_flat_tuple) != ownSizeof(kuzu_flat_tuple_570425807): - static : - warning("Declaration of " & "kuzu_flat_tuple" & - " exists but with different size") - kuzu_flat_tuple - else: - kuzu_flat_tuple_570425807) - struct_kuzu_timestamp_sec_t_570425834 = (when declared( - struct_kuzu_timestamp_sec_t): - when ownSizeof(struct_kuzu_timestamp_sec_t) != - ownSizeof(struct_kuzu_timestamp_sec_t_570425833): - static : - warning("Declaration of " & "struct_kuzu_timestamp_sec_t" & - " exists but with different size") - struct_kuzu_timestamp_sec_t - else: - struct_kuzu_timestamp_sec_t_570425833) - kuzu_timestamp_tz_t_570425840 = (when declared(kuzu_timestamp_tz_t): - when ownSizeof(kuzu_timestamp_tz_t) != ownSizeof(kuzu_timestamp_tz_t_570425839): - static : - warning("Declaration of " & "kuzu_timestamp_tz_t" & - " exists but with different size") - kuzu_timestamp_tz_t - else: - kuzu_timestamp_tz_t_570425839) - struct_kuzu_timestamp_t_570425842 = (when declared(struct_kuzu_timestamp_t): - when ownSizeof(struct_kuzu_timestamp_t) != - ownSizeof(struct_kuzu_timestamp_t_570425841): - static : - warning("Declaration of " & "struct_kuzu_timestamp_t" & - " exists but with different size") - struct_kuzu_timestamp_t - else: - struct_kuzu_timestamp_t_570425841) - kuzu_query_summary_570425852 = (when declared(kuzu_query_summary): - when ownSizeof(kuzu_query_summary) != ownSizeof(kuzu_query_summary_570425851): - static : - warning("Declaration of " & "kuzu_query_summary" & - " exists but with different size") - kuzu_query_summary - else: - kuzu_query_summary_570425851) - kuzu_timestamp_ns_t_570425828 = (when declared(kuzu_timestamp_ns_t): - when ownSizeof(kuzu_timestamp_ns_t) != ownSizeof(kuzu_timestamp_ns_t_570425827): - static : - warning("Declaration of " & "kuzu_timestamp_ns_t" & - " exists but with different size") - kuzu_timestamp_ns_t - else: - kuzu_timestamp_ns_t_570425827) - struct_kuzu_timestamp_ms_t_570425830 = (when declared( - struct_kuzu_timestamp_ms_t): - when ownSizeof(struct_kuzu_timestamp_ms_t) != - ownSizeof(struct_kuzu_timestamp_ms_t_570425829): - static : - warning("Declaration of " & "struct_kuzu_timestamp_ms_t" & - " exists but with different size") - struct_kuzu_timestamp_ms_t - else: - struct_kuzu_timestamp_ms_t_570425829) - kuzu_data_type_id_570425860 = (when declared(kuzu_data_type_id): - when ownSizeof(kuzu_data_type_id) != ownSizeof(kuzu_data_type_id_570425859): - static : - warning("Declaration of " & "kuzu_data_type_id" & - " exists but with different size") - kuzu_data_type_id - else: - kuzu_data_type_id_570425859) - enum_kuzu_state_570425862 = (when declared(enum_kuzu_state): - when ownSizeof(enum_kuzu_state) != ownSizeof(enum_kuzu_state_570425861): - static : - warning("Declaration of " & "enum_kuzu_state" & - " exists but with different size") - enum_kuzu_state - else: - enum_kuzu_state_570425861) - kuzu_date_t_570425824 = (when declared(kuzu_date_t): - when ownSizeof(kuzu_date_t) != ownSizeof(kuzu_date_t_570425823): - static : - warning("Declaration of " & "kuzu_date_t" & - " exists but with different size") - kuzu_date_t - else: - kuzu_date_t_570425823) - kuzu_state_570425864 = (when declared(kuzu_state): - when ownSizeof(kuzu_state) != ownSizeof(kuzu_state_570425863): - static : - warning("Declaration of " & "kuzu_state" & - " exists but with different size") - kuzu_state - else: - kuzu_state_570425863) - kuzu_timestamp_ms_t_570425832 = (when declared(kuzu_timestamp_ms_t): - when ownSizeof(kuzu_timestamp_ms_t) != ownSizeof(kuzu_timestamp_ms_t_570425831): - static : - warning("Declaration of " & "kuzu_timestamp_ms_t" & - " exists but with different size") - kuzu_timestamp_ms_t - else: - kuzu_timestamp_ms_t_570425831) - struct_kuzu_flat_tuple_570425806 = (when declared(struct_kuzu_flat_tuple): - when ownSizeof(struct_kuzu_flat_tuple) != ownSizeof(struct_kuzu_flat_tuple_570425805): - static : - warning("Declaration of " & "struct_kuzu_flat_tuple" & - " exists but with different size") - struct_kuzu_flat_tuple - else: - struct_kuzu_flat_tuple_570425805) - struct_kuzu_connection_570425794 = (when declared(struct_kuzu_connection): - when ownSizeof(struct_kuzu_connection) != ownSizeof(struct_kuzu_connection_570425793): - static : - warning("Declaration of " & "struct_kuzu_connection" & - " exists but with different size") - struct_kuzu_connection - else: - struct_kuzu_connection_570425793) - struct_kuzu_date_t_570425822 = (when declared(struct_kuzu_date_t): - when ownSizeof(struct_kuzu_date_t) != ownSizeof(struct_kuzu_date_t_570425821): - static : - warning("Declaration of " & "struct_kuzu_date_t" & - " exists but with different size") - struct_kuzu_date_t - else: - struct_kuzu_date_t_570425821) - struct_kuzu_timestamp_tz_t_570425838 = (when declared( - struct_kuzu_timestamp_tz_t): - when ownSizeof(struct_kuzu_timestamp_tz_t) != - ownSizeof(struct_kuzu_timestamp_tz_t_570425837): - static : - warning("Declaration of " & "struct_kuzu_timestamp_tz_t" & - " exists but with different size") - struct_kuzu_timestamp_tz_t - else: - struct_kuzu_timestamp_tz_t_570425837) - struct_kuzu_interval_t_570425846 = (when declared(struct_kuzu_interval_t): - when ownSizeof(struct_kuzu_interval_t) != ownSizeof(struct_kuzu_interval_t_570425845): - static : - warning("Declaration of " & "struct_kuzu_interval_t" & - " exists but with different size") - struct_kuzu_interval_t - else: - struct_kuzu_interval_t_570425845) - kuzu_int128_t_570425856 = (when declared(kuzu_int128_t): - when ownSizeof(kuzu_int128_t) != ownSizeof(kuzu_int128_t_570425855): - static : - warning("Declaration of " & "kuzu_int128_t" & - " exists but with different size") - kuzu_int128_t - else: - kuzu_int128_t_570425855) - struct_kuzu_system_config_570425786 = (when declared(struct_kuzu_system_config): - when ownSizeof(struct_kuzu_system_config) != - ownSizeof(struct_kuzu_system_config_570425785): - static : - warning("Declaration of " & "struct_kuzu_system_config" & - " exists but with different size") - struct_kuzu_system_config - else: - struct_kuzu_system_config_570425785) - kuzu_connection_570425796 = (when declared(kuzu_connection): - when ownSizeof(kuzu_connection) != ownSizeof(kuzu_connection_570425795): - static : - warning("Declaration of " & "kuzu_connection" & - " exists but with different size") - kuzu_connection - else: - kuzu_connection_570425795) - struct_ArrowSchema_570425782 = (when declared(struct_ArrowSchema): - when ownSizeof(struct_ArrowSchema) != ownSizeof(struct_ArrowSchema_570425781): - static : - warning("Declaration of " & "struct_ArrowSchema" & - " exists but with different size") - struct_ArrowSchema - else: - struct_ArrowSchema_570425781) - kuzu_prepared_statement_570425800 = (when declared(kuzu_prepared_statement): - when ownSizeof(kuzu_prepared_statement) != - ownSizeof(kuzu_prepared_statement_570425799): - static : - warning("Declaration of " & "kuzu_prepared_statement" & - " exists but with different size") - kuzu_prepared_statement - else: - kuzu_prepared_statement_570425799) - struct_kuzu_value_570425814 = (when declared(struct_kuzu_value): - when ownSizeof(struct_kuzu_value) != ownSizeof(struct_kuzu_value_570425813): - static : - warning("Declaration of " & "struct_kuzu_value" & - " exists but with different size") - struct_kuzu_value - else: - struct_kuzu_value_570425813) - kuzu_internal_id_t_570425820 = (when declared(kuzu_internal_id_t): - when ownSizeof(kuzu_internal_id_t) != ownSizeof(kuzu_internal_id_t_570425819): - static : - warning("Declaration of " & "kuzu_internal_id_t" & - " exists but with different size") - kuzu_internal_id_t - else: - kuzu_internal_id_t_570425819) - kuzu_system_config_570425788 = (when declared(kuzu_system_config): - when ownSizeof(kuzu_system_config) != ownSizeof(kuzu_system_config_570425787): - static : - warning("Declaration of " & "kuzu_system_config" & - " exists but with different size") - kuzu_system_config - else: - kuzu_system_config_570425787) - struct_tm_570425866 = (when declared(struct_tm): - when ownSizeof(struct_tm) != ownSizeof(struct_tm_570425865): - static : - warning("Declaration of " & "struct_tm" & - " exists but with different size") - struct_tm - else: - struct_tm_570425865) - struct_kuzu_query_result_570425802 = (when declared(struct_kuzu_query_result): - when ownSizeof(struct_kuzu_query_result) != - ownSizeof(struct_kuzu_query_result_570425801): - static : - warning("Declaration of " & "struct_kuzu_query_result" & - " exists but with different size") - struct_kuzu_query_result - else: - struct_kuzu_query_result_570425801) - struct_kuzu_database_570425790 = (when declared(struct_kuzu_database): - when ownSizeof(struct_kuzu_database) != ownSizeof(struct_kuzu_database_570425789): - static : - warning("Declaration of " & "struct_kuzu_database" & - " exists but with different size") - struct_kuzu_database - else: - struct_kuzu_database_570425789) - struct_kuzu_timestamp_ns_t_570425826 = (when declared( - struct_kuzu_timestamp_ns_t): - when ownSizeof(struct_kuzu_timestamp_ns_t) != - ownSizeof(struct_kuzu_timestamp_ns_t_570425825): - static : - warning("Declaration of " & "struct_kuzu_timestamp_ns_t" & - " exists but with different size") - struct_kuzu_timestamp_ns_t - else: - struct_kuzu_timestamp_ns_t_570425825) - kuzu_interval_t_570425848 = (when declared(kuzu_interval_t): - when ownSizeof(kuzu_interval_t) != ownSizeof(kuzu_interval_t_570425847): - static : - warning("Declaration of " & "kuzu_interval_t" & - " exists but with different size") - kuzu_interval_t - else: - kuzu_interval_t_570425847) - struct_kuzu_int128_t_570425854 = (when declared(struct_kuzu_int128_t): - when ownSizeof(struct_kuzu_int128_t) != ownSizeof(struct_kuzu_int128_t_570425853): - static : - warning("Declaration of " & "struct_kuzu_int128_t" & - " exists but with different size") - struct_kuzu_int128_t - else: - struct_kuzu_int128_t_570425853) - struct_ArrowArray_570425784 = (when declared(struct_ArrowArray): - when ownSizeof(struct_ArrowArray) != ownSizeof(struct_ArrowArray_570425783): - static : - warning("Declaration of " & "struct_ArrowArray" & - " exists but with different size") - struct_ArrowArray - else: - struct_ArrowArray_570425783) - struct_kuzu_logical_type_570425810 = (when declared(struct_kuzu_logical_type): - when ownSizeof(struct_kuzu_logical_type) != - ownSizeof(struct_kuzu_logical_type_570425809): - static : - warning("Declaration of " & "struct_kuzu_logical_type" & - " exists but with different size") - struct_kuzu_logical_type - else: - struct_kuzu_logical_type_570425809) - struct_kuzu_query_summary_570425850 = (when declared(struct_kuzu_query_summary): - when ownSizeof(struct_kuzu_query_summary) != - ownSizeof(struct_kuzu_query_summary_570425849): - static : - warning("Declaration of " & "struct_kuzu_query_summary" & - " exists but with different size") - struct_kuzu_query_summary - else: - struct_kuzu_query_summary_570425849) - kuzu_logical_type_570425812 = (when declared(kuzu_logical_type): - when ownSizeof(kuzu_logical_type) != ownSizeof(kuzu_logical_type_570425811): - static : - warning("Declaration of " & "kuzu_logical_type" & - " exists but with different size") - kuzu_logical_type - else: - kuzu_logical_type_570425811) - kuzu_value_570425816 = (when declared(kuzu_value): - when ownSizeof(kuzu_value) != ownSizeof(kuzu_value_570425815): - static : - warning("Declaration of " & "kuzu_value" & - " exists but with different size") - kuzu_value - else: - kuzu_value_570425815) - kuzu_timestamp_sec_t_570425836 = (when declared(kuzu_timestamp_sec_t): - when ownSizeof(kuzu_timestamp_sec_t) != ownSizeof(kuzu_timestamp_sec_t_570425835): - static : - warning("Declaration of " & "kuzu_timestamp_sec_t" & - " exists but with different size") - kuzu_timestamp_sec_t - else: - kuzu_timestamp_sec_t_570425835) - enum_kuzu_data_type_id_570425858 = (when declared(enum_kuzu_data_type_id): - when ownSizeof(enum_kuzu_data_type_id) != ownSizeof(enum_kuzu_data_type_id_570425857): - static : - warning("Declaration of " & "enum_kuzu_data_type_id" & - " exists but with different size") - enum_kuzu_data_type_id - else: - enum_kuzu_data_type_id_570425857) - kuzu_query_result_570425804 = (when declared(kuzu_query_result): - when ownSizeof(kuzu_query_result) != ownSizeof(kuzu_query_result_570425803): - static : - warning("Declaration of " & "kuzu_query_result" & - " exists but with different size") - kuzu_query_result - else: - kuzu_query_result_570425803) - struct_kuzu_internal_id_t_570425818 = (when declared(struct_kuzu_internal_id_t): - when ownSizeof(struct_kuzu_internal_id_t) != - ownSizeof(struct_kuzu_internal_id_t_570425817): - static : - warning("Declaration of " & "struct_kuzu_internal_id_t" & - " exists but with different size") - struct_kuzu_internal_id_t - else: - struct_kuzu_internal_id_t_570425817) - kuzu_database_570425792 = (when declared(kuzu_database): - when ownSizeof(kuzu_database) != ownSizeof(kuzu_database_570425791): - static : - warning("Declaration of " & "kuzu_database" & - " exists but with different size") - kuzu_database - else: - kuzu_database_570425791) - kuzu_timestamp_t_570425844 = (when declared(kuzu_timestamp_t): - when ownSizeof(kuzu_timestamp_t) != ownSizeof(kuzu_timestamp_t_570425843): - static : - warning("Declaration of " & "kuzu_timestamp_t" & - " exists but with different size") - kuzu_timestamp_t - else: - kuzu_timestamp_t_570425843) -when not declared(struct_kuzu_prepared_statement): - type - struct_kuzu_prepared_statement* = struct_kuzu_prepared_statement_570425797 -else: - static : - hint("Declaration of " & "struct_kuzu_prepared_statement" & - " already exists, not redeclaring") -when not declared(kuzu_flat_tuple): - type - kuzu_flat_tuple* = kuzu_flat_tuple_570425807 -else: - static : - hint("Declaration of " & "kuzu_flat_tuple" & - " already exists, not redeclaring") -when not declared(struct_kuzu_timestamp_sec_t): - type - struct_kuzu_timestamp_sec_t* = struct_kuzu_timestamp_sec_t_570425833 -else: - static : - hint("Declaration of " & "struct_kuzu_timestamp_sec_t" & - " already exists, not redeclaring") -when not declared(kuzu_timestamp_tz_t): - type - kuzu_timestamp_tz_t* = kuzu_timestamp_tz_t_570425839 -else: - static : - hint("Declaration of " & "kuzu_timestamp_tz_t" & - " already exists, not redeclaring") -when not declared(struct_kuzu_timestamp_t): - type - struct_kuzu_timestamp_t* = struct_kuzu_timestamp_t_570425841 -else: - static : - hint("Declaration of " & "struct_kuzu_timestamp_t" & - " already exists, not redeclaring") -when not declared(kuzu_query_summary): - type - kuzu_query_summary* = kuzu_query_summary_570425851 -else: - static : - hint("Declaration of " & "kuzu_query_summary" & - " already exists, not redeclaring") -when not declared(kuzu_timestamp_ns_t): - type - kuzu_timestamp_ns_t* = kuzu_timestamp_ns_t_570425827 -else: - static : - hint("Declaration of " & "kuzu_timestamp_ns_t" & - " already exists, not redeclaring") -when not declared(struct_kuzu_timestamp_ms_t): - type - struct_kuzu_timestamp_ms_t* = struct_kuzu_timestamp_ms_t_570425829 -else: - static : - hint("Declaration of " & "struct_kuzu_timestamp_ms_t" & - " already exists, not redeclaring") -when not declared(kuzu_data_type_id): - type - kuzu_data_type_id* = kuzu_data_type_id_570425859 -else: - static : - hint("Declaration of " & "kuzu_data_type_id" & - " already exists, not redeclaring") -when not declared(enum_kuzu_state): - type - enum_kuzu_state* = enum_kuzu_state_570425861 -else: - static : - hint("Declaration of " & "enum_kuzu_state" & - " already exists, not redeclaring") -when not declared(kuzu_date_t): - type - kuzu_date_t* = kuzu_date_t_570425823 -else: - static : - hint("Declaration of " & "kuzu_date_t" & " already exists, not redeclaring") -when not declared(kuzu_state): - type - kuzu_state* = kuzu_state_570425863 -else: - static : - hint("Declaration of " & "kuzu_state" & " already exists, not redeclaring") -when not declared(kuzu_timestamp_ms_t): - type - kuzu_timestamp_ms_t* = kuzu_timestamp_ms_t_570425831 -else: - static : - hint("Declaration of " & "kuzu_timestamp_ms_t" & - " already exists, not redeclaring") -when not declared(struct_kuzu_flat_tuple): - type - struct_kuzu_flat_tuple* = struct_kuzu_flat_tuple_570425805 -else: - static : - hint("Declaration of " & "struct_kuzu_flat_tuple" & - " already exists, not redeclaring") -when not declared(struct_kuzu_connection): - type - struct_kuzu_connection* = struct_kuzu_connection_570425793 -else: - static : - hint("Declaration of " & "struct_kuzu_connection" & - " already exists, not redeclaring") -when not declared(struct_kuzu_date_t): - type - struct_kuzu_date_t* = struct_kuzu_date_t_570425821 -else: - static : - hint("Declaration of " & "struct_kuzu_date_t" & - " already exists, not redeclaring") -when not declared(struct_kuzu_timestamp_tz_t): - type - struct_kuzu_timestamp_tz_t* = struct_kuzu_timestamp_tz_t_570425837 -else: - static : - hint("Declaration of " & "struct_kuzu_timestamp_tz_t" & - " already exists, not redeclaring") -when not declared(struct_kuzu_interval_t): - type - struct_kuzu_interval_t* = struct_kuzu_interval_t_570425845 -else: - static : - hint("Declaration of " & "struct_kuzu_interval_t" & - " already exists, not redeclaring") -when not declared(kuzu_int128_t): - type - kuzu_int128_t* = kuzu_int128_t_570425855 -else: - static : - hint("Declaration of " & "kuzu_int128_t" & - " already exists, not redeclaring") -when not declared(struct_kuzu_system_config): - type - struct_kuzu_system_config* = struct_kuzu_system_config_570425785 -else: - static : - hint("Declaration of " & "struct_kuzu_system_config" & - " already exists, not redeclaring") -when not declared(kuzu_connection): - type - kuzu_connection* = kuzu_connection_570425795 -else: - static : - hint("Declaration of " & "kuzu_connection" & - " already exists, not redeclaring") -when not declared(struct_ArrowSchema): - type - struct_ArrowSchema* = struct_ArrowSchema_570425781 -else: - static : - hint("Declaration of " & "struct_ArrowSchema" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement): - type - kuzu_prepared_statement* = kuzu_prepared_statement_570425799 -else: - static : - hint("Declaration of " & "kuzu_prepared_statement" & - " already exists, not redeclaring") -when not declared(struct_kuzu_value): - type - struct_kuzu_value* = struct_kuzu_value_570425813 -else: - static : - hint("Declaration of " & "struct_kuzu_value" & - " already exists, not redeclaring") -when not declared(kuzu_internal_id_t): - type - kuzu_internal_id_t* = kuzu_internal_id_t_570425819 -else: - static : - hint("Declaration of " & "kuzu_internal_id_t" & - " already exists, not redeclaring") -when not declared(kuzu_system_config): - type - kuzu_system_config* = kuzu_system_config_570425787 -else: - static : - hint("Declaration of " & "kuzu_system_config" & - " already exists, not redeclaring") -when not declared(struct_tm): - type - struct_tm* = struct_tm_570425865 -else: - static : - hint("Declaration of " & "struct_tm" & " already exists, not redeclaring") -when not declared(struct_kuzu_query_result): - type - struct_kuzu_query_result* = struct_kuzu_query_result_570425801 -else: - static : - hint("Declaration of " & "struct_kuzu_query_result" & - " already exists, not redeclaring") -when not declared(struct_kuzu_database): - type - struct_kuzu_database* = struct_kuzu_database_570425789 -else: - static : - hint("Declaration of " & "struct_kuzu_database" & - " already exists, not redeclaring") -when not declared(struct_kuzu_timestamp_ns_t): - type - struct_kuzu_timestamp_ns_t* = struct_kuzu_timestamp_ns_t_570425825 -else: - static : - hint("Declaration of " & "struct_kuzu_timestamp_ns_t" & - " already exists, not redeclaring") -when not declared(kuzu_interval_t): - type - kuzu_interval_t* = kuzu_interval_t_570425847 -else: - static : - hint("Declaration of " & "kuzu_interval_t" & - " already exists, not redeclaring") -when not declared(struct_kuzu_int128_t): - type - struct_kuzu_int128_t* = struct_kuzu_int128_t_570425853 -else: - static : - hint("Declaration of " & "struct_kuzu_int128_t" & - " already exists, not redeclaring") -when not declared(struct_ArrowArray): - type - struct_ArrowArray* = struct_ArrowArray_570425783 -else: - static : - hint("Declaration of " & "struct_ArrowArray" & - " already exists, not redeclaring") -when not declared(struct_kuzu_logical_type): - type - struct_kuzu_logical_type* = struct_kuzu_logical_type_570425809 -else: - static : - hint("Declaration of " & "struct_kuzu_logical_type" & - " already exists, not redeclaring") -when not declared(struct_kuzu_query_summary): - type - struct_kuzu_query_summary* = struct_kuzu_query_summary_570425849 -else: - static : - hint("Declaration of " & "struct_kuzu_query_summary" & - " already exists, not redeclaring") -when not declared(kuzu_logical_type): - type - kuzu_logical_type* = kuzu_logical_type_570425811 -else: - static : - hint("Declaration of " & "kuzu_logical_type" & - " already exists, not redeclaring") -when not declared(kuzu_value): - type - kuzu_value* = kuzu_value_570425815 -else: - static : - hint("Declaration of " & "kuzu_value" & " already exists, not redeclaring") -when not declared(kuzu_timestamp_sec_t): - type - kuzu_timestamp_sec_t* = kuzu_timestamp_sec_t_570425835 -else: - static : - hint("Declaration of " & "kuzu_timestamp_sec_t" & - " already exists, not redeclaring") -when not declared(enum_kuzu_data_type_id): - type - enum_kuzu_data_type_id* = enum_kuzu_data_type_id_570425857 -else: - static : - hint("Declaration of " & "enum_kuzu_data_type_id" & - " already exists, not redeclaring") -when not declared(kuzu_query_result): - type - kuzu_query_result* = kuzu_query_result_570425803 -else: - static : - hint("Declaration of " & "kuzu_query_result" & - " already exists, not redeclaring") -when not declared(struct_kuzu_internal_id_t): - type - struct_kuzu_internal_id_t* = struct_kuzu_internal_id_t_570425817 -else: - static : - hint("Declaration of " & "struct_kuzu_internal_id_t" & - " already exists, not redeclaring") -when not declared(kuzu_database): - type - kuzu_database* = kuzu_database_570425791 -else: - static : - hint("Declaration of " & "kuzu_database" & - " already exists, not redeclaring") -when not declared(kuzu_timestamp_t): - type - kuzu_timestamp_t* = kuzu_timestamp_t_570425843 -else: - static : - hint("Declaration of " & "kuzu_timestamp_t" & - " already exists, not redeclaring") -when not declared(KUZU_API): - when KUZU_HELPER_DLL_IMPORT is typedesc: - type - KUZU_API* = KUZU_HELPER_DLL_IMPORT ## Generated based on /usr/include/kuzu.h:33:9 - else: - when KUZU_HELPER_DLL_IMPORT is static: - const - KUZU_API* = KUZU_HELPER_DLL_IMPORT ## Generated based on /usr/include/kuzu.h:33:9 - else: - let KUZU_API* = KUZU_HELPER_DLL_IMPORT ## Generated based on /usr/include/kuzu.h:33:9 -else: - static : - hint("Declaration of " & "KUZU_API" & " already exists, not redeclaring") -when not declared(KUZU_DEPRECATED): - when KUZU_HELPER_DEPRECATED is typedesc: - type - KUZU_DEPRECATED* = KUZU_HELPER_DEPRECATED ## Generated based on /usr/include/kuzu.h:40:9 - else: - when KUZU_HELPER_DEPRECATED is static: - const - KUZU_DEPRECATED* = KUZU_HELPER_DEPRECATED ## Generated based on /usr/include/kuzu.h:40:9 - else: - let KUZU_DEPRECATED* = KUZU_HELPER_DEPRECATED ## Generated based on /usr/include/kuzu.h:40:9 -else: - static : - hint("Declaration of " & "KUZU_DEPRECATED" & - " already exists, not redeclaring") -when not declared(ARROW_FLAG_DICTIONARY_ORDERED): - when 1 is static: - const - ARROW_FLAG_DICTIONARY_ORDERED* = 1 ## Generated based on /usr/include/kuzu.h:60:9 - else: - let ARROW_FLAG_DICTIONARY_ORDERED* = 1 ## Generated based on /usr/include/kuzu.h:60:9 -else: - static : - hint("Declaration of " & "ARROW_FLAG_DICTIONARY_ORDERED" & - " already exists, not redeclaring") -when not declared(ARROW_FLAG_NULLABLE): - when 2 is static: - const - ARROW_FLAG_NULLABLE* = 2 ## Generated based on /usr/include/kuzu.h:61:9 - else: - let ARROW_FLAG_NULLABLE* = 2 ## Generated based on /usr/include/kuzu.h:61:9 -else: - static : - hint("Declaration of " & "ARROW_FLAG_NULLABLE" & - " already exists, not redeclaring") -when not declared(ARROW_FLAG_MAP_KEYS_SORTED): - when 4 is static: - const - ARROW_FLAG_MAP_KEYS_SORTED* = 4 ## Generated based on /usr/include/kuzu.h:62:9 - else: - let ARROW_FLAG_MAP_KEYS_SORTED* = 4 ## Generated based on /usr/include/kuzu.h:62:9 -else: - static : - hint("Declaration of " & "ARROW_FLAG_MAP_KEYS_SORTED" & - " already exists, not redeclaring") -when not declared(kuzu_database_init): - proc kuzu_database_init*(database_path: cstring; - system_config: kuzu_system_config_570425788; - out_database: ptr kuzu_database_570425792): kuzu_state_570425864 {. - cdecl, importc: "kuzu_database_init".} -else: - static : - hint("Declaration of " & "kuzu_database_init" & - " already exists, not redeclaring") -when not declared(kuzu_database_destroy): - proc kuzu_database_destroy*(database: ptr kuzu_database_570425792): void {. - cdecl, importc: "kuzu_database_destroy".} -else: - static : - hint("Declaration of " & "kuzu_database_destroy" & - " already exists, not redeclaring") -when not declared(kuzu_default_system_config): - proc kuzu_default_system_config*(): kuzu_system_config_570425788 {.cdecl, - importc: "kuzu_default_system_config".} -else: - static : - hint("Declaration of " & "kuzu_default_system_config" & - " already exists, not redeclaring") -when not declared(kuzu_connection_init): - proc kuzu_connection_init*(database: ptr kuzu_database_570425792; - out_connection: ptr kuzu_connection_570425796): kuzu_state_570425864 {. - cdecl, importc: "kuzu_connection_init".} -else: - static : - hint("Declaration of " & "kuzu_connection_init" & - " already exists, not redeclaring") -when not declared(kuzu_connection_destroy): - proc kuzu_connection_destroy*(connection: ptr kuzu_connection_570425796): void {. - cdecl, importc: "kuzu_connection_destroy".} -else: - static : - hint("Declaration of " & "kuzu_connection_destroy" & - " already exists, not redeclaring") -when not declared(kuzu_connection_set_max_num_thread_for_exec): - proc kuzu_connection_set_max_num_thread_for_exec*( - connection: ptr kuzu_connection_570425796; num_threads: uint64): kuzu_state_570425864 {. - cdecl, importc: "kuzu_connection_set_max_num_thread_for_exec".} -else: - static : - hint("Declaration of " & "kuzu_connection_set_max_num_thread_for_exec" & - " already exists, not redeclaring") -when not declared(kuzu_connection_get_max_num_thread_for_exec): - proc kuzu_connection_get_max_num_thread_for_exec*( - connection: ptr kuzu_connection_570425796; out_result: ptr uint64): kuzu_state_570425864 {. - cdecl, importc: "kuzu_connection_get_max_num_thread_for_exec".} -else: - static : - hint("Declaration of " & "kuzu_connection_get_max_num_thread_for_exec" & - " already exists, not redeclaring") -when not declared(kuzu_connection_query): - proc kuzu_connection_query*(connection: ptr kuzu_connection_570425796; - query: cstring; - out_query_result: ptr kuzu_query_result_570425804): kuzu_state_570425864 {. - cdecl, importc: "kuzu_connection_query".} -else: - static : - hint("Declaration of " & "kuzu_connection_query" & - " already exists, not redeclaring") -when not declared(kuzu_connection_prepare): - proc kuzu_connection_prepare*(connection: ptr kuzu_connection_570425796; - query: cstring; out_prepared_statement: ptr kuzu_prepared_statement_570425800): kuzu_state_570425864 {. - cdecl, importc: "kuzu_connection_prepare".} -else: - static : - hint("Declaration of " & "kuzu_connection_prepare" & - " already exists, not redeclaring") -when not declared(kuzu_connection_execute): - proc kuzu_connection_execute*(connection: ptr kuzu_connection_570425796; - prepared_statement: ptr kuzu_prepared_statement_570425800; - out_query_result: ptr kuzu_query_result_570425804): kuzu_state_570425864 {. - cdecl, importc: "kuzu_connection_execute".} -else: - static : - hint("Declaration of " & "kuzu_connection_execute" & - " already exists, not redeclaring") -when not declared(kuzu_connection_interrupt): - proc kuzu_connection_interrupt*(connection: ptr kuzu_connection_570425796): void {. - cdecl, importc: "kuzu_connection_interrupt".} -else: - static : - hint("Declaration of " & "kuzu_connection_interrupt" & - " already exists, not redeclaring") -when not declared(kuzu_connection_set_query_timeout): - proc kuzu_connection_set_query_timeout*(connection: ptr kuzu_connection_570425796; - timeout_in_ms: uint64): kuzu_state_570425864 {.cdecl, - importc: "kuzu_connection_set_query_timeout".} -else: - static : - hint("Declaration of " & "kuzu_connection_set_query_timeout" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_destroy): - proc kuzu_prepared_statement_destroy*(prepared_statement: ptr kuzu_prepared_statement_570425800): void {. - cdecl, importc: "kuzu_prepared_statement_destroy".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_destroy" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_is_success): - proc kuzu_prepared_statement_is_success*( - prepared_statement: ptr kuzu_prepared_statement_570425800): bool {.cdecl, - importc: "kuzu_prepared_statement_is_success".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_is_success" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_get_error_message): - proc kuzu_prepared_statement_get_error_message*( - prepared_statement: ptr kuzu_prepared_statement_570425800): cstring {. - cdecl, importc: "kuzu_prepared_statement_get_error_message".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_get_error_message" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_bind_bool): - proc kuzu_prepared_statement_bind_bool*( - prepared_statement: ptr kuzu_prepared_statement_570425800; - param_name: cstring; value: bool): kuzu_state_570425864 {.cdecl, - importc: "kuzu_prepared_statement_bind_bool".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_bind_bool" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_bind_int64): - proc kuzu_prepared_statement_bind_int64*( - prepared_statement: ptr kuzu_prepared_statement_570425800; - param_name: cstring; value: int64): kuzu_state_570425864 {.cdecl, - importc: "kuzu_prepared_statement_bind_int64".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_bind_int64" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_bind_int32): - proc kuzu_prepared_statement_bind_int32*( - prepared_statement: ptr kuzu_prepared_statement_570425800; - param_name: cstring; value: int32): kuzu_state_570425864 {.cdecl, - importc: "kuzu_prepared_statement_bind_int32".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_bind_int32" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_bind_int16): - proc kuzu_prepared_statement_bind_int16*( - prepared_statement: ptr kuzu_prepared_statement_570425800; - param_name: cstring; value: int16): kuzu_state_570425864 {.cdecl, - importc: "kuzu_prepared_statement_bind_int16".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_bind_int16" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_bind_int8): - proc kuzu_prepared_statement_bind_int8*( - prepared_statement: ptr kuzu_prepared_statement_570425800; - param_name: cstring; value: int8): kuzu_state_570425864 {.cdecl, - importc: "kuzu_prepared_statement_bind_int8".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_bind_int8" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_bind_uint64): - proc kuzu_prepared_statement_bind_uint64*( - prepared_statement: ptr kuzu_prepared_statement_570425800; - param_name: cstring; value: uint64): kuzu_state_570425864 {.cdecl, - importc: "kuzu_prepared_statement_bind_uint64".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_bind_uint64" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_bind_uint32): - proc kuzu_prepared_statement_bind_uint32*( - prepared_statement: ptr kuzu_prepared_statement_570425800; - param_name: cstring; value: uint32): kuzu_state_570425864 {.cdecl, - importc: "kuzu_prepared_statement_bind_uint32".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_bind_uint32" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_bind_uint16): - proc kuzu_prepared_statement_bind_uint16*( - prepared_statement: ptr kuzu_prepared_statement_570425800; - param_name: cstring; value: uint16): kuzu_state_570425864 {.cdecl, - importc: "kuzu_prepared_statement_bind_uint16".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_bind_uint16" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_bind_uint8): - proc kuzu_prepared_statement_bind_uint8*( - prepared_statement: ptr kuzu_prepared_statement_570425800; - param_name: cstring; value: uint8): kuzu_state_570425864 {.cdecl, - importc: "kuzu_prepared_statement_bind_uint8".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_bind_uint8" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_bind_double): - proc kuzu_prepared_statement_bind_double*( - prepared_statement: ptr kuzu_prepared_statement_570425800; - param_name: cstring; value: cdouble): kuzu_state_570425864 {.cdecl, - importc: "kuzu_prepared_statement_bind_double".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_bind_double" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_bind_float): - proc kuzu_prepared_statement_bind_float*( - prepared_statement: ptr kuzu_prepared_statement_570425800; - param_name: cstring; value: cfloat): kuzu_state_570425864 {.cdecl, - importc: "kuzu_prepared_statement_bind_float".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_bind_float" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_bind_date): - proc kuzu_prepared_statement_bind_date*( - prepared_statement: ptr kuzu_prepared_statement_570425800; - param_name: cstring; value: kuzu_date_t_570425824): kuzu_state_570425864 {. - cdecl, importc: "kuzu_prepared_statement_bind_date".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_bind_date" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_bind_timestamp_ns): - proc kuzu_prepared_statement_bind_timestamp_ns*( - prepared_statement: ptr kuzu_prepared_statement_570425800; - param_name: cstring; value: kuzu_timestamp_ns_t_570425828): kuzu_state_570425864 {. - cdecl, importc: "kuzu_prepared_statement_bind_timestamp_ns".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_bind_timestamp_ns" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_bind_timestamp_sec): - proc kuzu_prepared_statement_bind_timestamp_sec*( - prepared_statement: ptr kuzu_prepared_statement_570425800; - param_name: cstring; value: kuzu_timestamp_sec_t_570425836): kuzu_state_570425864 {. - cdecl, importc: "kuzu_prepared_statement_bind_timestamp_sec".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_bind_timestamp_sec" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_bind_timestamp_tz): - proc kuzu_prepared_statement_bind_timestamp_tz*( - prepared_statement: ptr kuzu_prepared_statement_570425800; - param_name: cstring; value: kuzu_timestamp_tz_t_570425840): kuzu_state_570425864 {. - cdecl, importc: "kuzu_prepared_statement_bind_timestamp_tz".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_bind_timestamp_tz" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_bind_timestamp_ms): - proc kuzu_prepared_statement_bind_timestamp_ms*( - prepared_statement: ptr kuzu_prepared_statement_570425800; - param_name: cstring; value: kuzu_timestamp_ms_t_570425832): kuzu_state_570425864 {. - cdecl, importc: "kuzu_prepared_statement_bind_timestamp_ms".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_bind_timestamp_ms" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_bind_timestamp): - proc kuzu_prepared_statement_bind_timestamp*( - prepared_statement: ptr kuzu_prepared_statement_570425800; - param_name: cstring; value: kuzu_timestamp_t_570425844): kuzu_state_570425864 {. - cdecl, importc: "kuzu_prepared_statement_bind_timestamp".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_bind_timestamp" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_bind_interval): - proc kuzu_prepared_statement_bind_interval*( - prepared_statement: ptr kuzu_prepared_statement_570425800; - param_name: cstring; value: kuzu_interval_t_570425848): kuzu_state_570425864 {. - cdecl, importc: "kuzu_prepared_statement_bind_interval".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_bind_interval" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_bind_string): - proc kuzu_prepared_statement_bind_string*( - prepared_statement: ptr kuzu_prepared_statement_570425800; - param_name: cstring; value: cstring): kuzu_state_570425864 {.cdecl, - importc: "kuzu_prepared_statement_bind_string".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_bind_string" & - " already exists, not redeclaring") -when not declared(kuzu_prepared_statement_bind_value): - proc kuzu_prepared_statement_bind_value*( - prepared_statement: ptr kuzu_prepared_statement_570425800; - param_name: cstring; value: ptr kuzu_value_570425816): kuzu_state_570425864 {. - cdecl, importc: "kuzu_prepared_statement_bind_value".} -else: - static : - hint("Declaration of " & "kuzu_prepared_statement_bind_value" & - " already exists, not redeclaring") -when not declared(kuzu_query_result_destroy): - proc kuzu_query_result_destroy*(query_result: ptr kuzu_query_result_570425804): void {. - cdecl, importc: "kuzu_query_result_destroy".} -else: - static : - hint("Declaration of " & "kuzu_query_result_destroy" & - " already exists, not redeclaring") -when not declared(kuzu_query_result_is_success): - proc kuzu_query_result_is_success*(query_result: ptr kuzu_query_result_570425804): bool {. - cdecl, importc: "kuzu_query_result_is_success".} -else: - static : - hint("Declaration of " & "kuzu_query_result_is_success" & - " already exists, not redeclaring") -when not declared(kuzu_query_result_get_error_message): - proc kuzu_query_result_get_error_message*(query_result: ptr kuzu_query_result_570425804): cstring {. - cdecl, importc: "kuzu_query_result_get_error_message".} -else: - static : - hint("Declaration of " & "kuzu_query_result_get_error_message" & - " already exists, not redeclaring") -when not declared(kuzu_query_result_get_num_columns): - proc kuzu_query_result_get_num_columns*(query_result: ptr kuzu_query_result_570425804): uint64 {. - cdecl, importc: "kuzu_query_result_get_num_columns".} -else: - static : - hint("Declaration of " & "kuzu_query_result_get_num_columns" & - " already exists, not redeclaring") -when not declared(kuzu_query_result_get_column_name): - proc kuzu_query_result_get_column_name*(query_result: ptr kuzu_query_result_570425804; - index: uint64; out_column_name: ptr cstring): kuzu_state_570425864 {. - cdecl, importc: "kuzu_query_result_get_column_name".} -else: - static : - hint("Declaration of " & "kuzu_query_result_get_column_name" & - " already exists, not redeclaring") -when not declared(kuzu_query_result_get_column_data_type): - proc kuzu_query_result_get_column_data_type*( - query_result: ptr kuzu_query_result_570425804; index: uint64; - out_column_data_type: ptr kuzu_logical_type_570425812): kuzu_state_570425864 {. - cdecl, importc: "kuzu_query_result_get_column_data_type".} -else: - static : - hint("Declaration of " & "kuzu_query_result_get_column_data_type" & - " already exists, not redeclaring") -when not declared(kuzu_query_result_get_num_tuples): - proc kuzu_query_result_get_num_tuples*(query_result: ptr kuzu_query_result_570425804): uint64 {. - cdecl, importc: "kuzu_query_result_get_num_tuples".} -else: - static : - hint("Declaration of " & "kuzu_query_result_get_num_tuples" & - " already exists, not redeclaring") -when not declared(kuzu_query_result_get_query_summary): - proc kuzu_query_result_get_query_summary*(query_result: ptr kuzu_query_result_570425804; - out_query_summary: ptr kuzu_query_summary_570425852): kuzu_state_570425864 {. - cdecl, importc: "kuzu_query_result_get_query_summary".} -else: - static : - hint("Declaration of " & "kuzu_query_result_get_query_summary" & - " already exists, not redeclaring") -when not declared(kuzu_query_result_has_next): - proc kuzu_query_result_has_next*(query_result: ptr kuzu_query_result_570425804): bool {. - cdecl, importc: "kuzu_query_result_has_next".} -else: - static : - hint("Declaration of " & "kuzu_query_result_has_next" & - " already exists, not redeclaring") -when not declared(kuzu_query_result_get_next): - proc kuzu_query_result_get_next*(query_result: ptr kuzu_query_result_570425804; - out_flat_tuple: ptr kuzu_flat_tuple_570425808): kuzu_state_570425864 {. - cdecl, importc: "kuzu_query_result_get_next".} -else: - static : - hint("Declaration of " & "kuzu_query_result_get_next" & - " already exists, not redeclaring") -when not declared(kuzu_query_result_has_next_query_result): - proc kuzu_query_result_has_next_query_result*( - query_result: ptr kuzu_query_result_570425804): bool {.cdecl, - importc: "kuzu_query_result_has_next_query_result".} -else: - static : - hint("Declaration of " & "kuzu_query_result_has_next_query_result" & - " already exists, not redeclaring") -when not declared(kuzu_query_result_get_next_query_result): - proc kuzu_query_result_get_next_query_result*( - query_result: ptr kuzu_query_result_570425804; - out_next_query_result: ptr kuzu_query_result_570425804): kuzu_state_570425864 {. - cdecl, importc: "kuzu_query_result_get_next_query_result".} -else: - static : - hint("Declaration of " & "kuzu_query_result_get_next_query_result" & - " already exists, not redeclaring") -when not declared(kuzu_query_result_to_string): - proc kuzu_query_result_to_string*(query_result: ptr kuzu_query_result_570425804): cstring {. - cdecl, importc: "kuzu_query_result_to_string".} -else: - static : - hint("Declaration of " & "kuzu_query_result_to_string" & - " already exists, not redeclaring") -when not declared(kuzu_query_result_reset_iterator): - proc kuzu_query_result_reset_iterator*(query_result: ptr kuzu_query_result_570425804): void {. - cdecl, importc: "kuzu_query_result_reset_iterator".} -else: - static : - hint("Declaration of " & "kuzu_query_result_reset_iterator" & - " already exists, not redeclaring") -when not declared(kuzu_query_result_get_arrow_schema): - proc kuzu_query_result_get_arrow_schema*(query_result: ptr kuzu_query_result_570425804; - out_schema: ptr struct_ArrowSchema_570425782): kuzu_state_570425864 {. - cdecl, importc: "kuzu_query_result_get_arrow_schema".} -else: - static : - hint("Declaration of " & "kuzu_query_result_get_arrow_schema" & - " already exists, not redeclaring") -when not declared(kuzu_query_result_get_next_arrow_chunk): - proc kuzu_query_result_get_next_arrow_chunk*( - query_result: ptr kuzu_query_result_570425804; chunk_size: int64; - out_arrow_array: ptr struct_ArrowArray_570425784): kuzu_state_570425864 {. - cdecl, importc: "kuzu_query_result_get_next_arrow_chunk".} -else: - static : - hint("Declaration of " & "kuzu_query_result_get_next_arrow_chunk" & - " already exists, not redeclaring") -when not declared(kuzu_flat_tuple_destroy): - proc kuzu_flat_tuple_destroy*(flat_tuple: ptr kuzu_flat_tuple_570425808): void {. - cdecl, importc: "kuzu_flat_tuple_destroy".} -else: - static : - hint("Declaration of " & "kuzu_flat_tuple_destroy" & - " already exists, not redeclaring") -when not declared(kuzu_flat_tuple_get_value): - proc kuzu_flat_tuple_get_value*(flat_tuple: ptr kuzu_flat_tuple_570425808; - index: uint64; out_value: ptr kuzu_value_570425816): kuzu_state_570425864 {. - cdecl, importc: "kuzu_flat_tuple_get_value".} -else: - static : - hint("Declaration of " & "kuzu_flat_tuple_get_value" & - " already exists, not redeclaring") -when not declared(kuzu_flat_tuple_to_string): - proc kuzu_flat_tuple_to_string*(flat_tuple: ptr kuzu_flat_tuple_570425808): cstring {. - cdecl, importc: "kuzu_flat_tuple_to_string".} -else: - static : - hint("Declaration of " & "kuzu_flat_tuple_to_string" & - " already exists, not redeclaring") -when not declared(kuzu_data_type_create): - proc kuzu_data_type_create*(id: kuzu_data_type_id_570425860; - child_type: ptr kuzu_logical_type_570425812; - num_elements_in_array: uint64; - out_type: ptr kuzu_logical_type_570425812): void {. - cdecl, importc: "kuzu_data_type_create".} -else: - static : - hint("Declaration of " & "kuzu_data_type_create" & - " already exists, not redeclaring") -when not declared(kuzu_data_type_clone): - proc kuzu_data_type_clone*(data_type: ptr kuzu_logical_type_570425812; - out_type: ptr kuzu_logical_type_570425812): void {. - cdecl, importc: "kuzu_data_type_clone".} -else: - static : - hint("Declaration of " & "kuzu_data_type_clone" & - " already exists, not redeclaring") -when not declared(kuzu_data_type_destroy): - proc kuzu_data_type_destroy*(data_type: ptr kuzu_logical_type_570425812): void {. - cdecl, importc: "kuzu_data_type_destroy".} -else: - static : - hint("Declaration of " & "kuzu_data_type_destroy" & - " already exists, not redeclaring") -when not declared(kuzu_data_type_equals): - proc kuzu_data_type_equals*(data_type1: ptr kuzu_logical_type_570425812; - data_type2: ptr kuzu_logical_type_570425812): bool {. - cdecl, importc: "kuzu_data_type_equals".} -else: - static : - hint("Declaration of " & "kuzu_data_type_equals" & - " already exists, not redeclaring") -when not declared(kuzu_data_type_get_id): - proc kuzu_data_type_get_id*(data_type: ptr kuzu_logical_type_570425812): kuzu_data_type_id_570425860 {. - cdecl, importc: "kuzu_data_type_get_id".} -else: - static : - hint("Declaration of " & "kuzu_data_type_get_id" & - " already exists, not redeclaring") -when not declared(kuzu_data_type_get_num_elements_in_array): - proc kuzu_data_type_get_num_elements_in_array*( - data_type: ptr kuzu_logical_type_570425812; out_result: ptr uint64): kuzu_state_570425864 {. - cdecl, importc: "kuzu_data_type_get_num_elements_in_array".} -else: - static : - hint("Declaration of " & "kuzu_data_type_get_num_elements_in_array" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_null): - proc kuzu_value_create_null*(): ptr kuzu_value_570425816 {.cdecl, - importc: "kuzu_value_create_null".} -else: - static : - hint("Declaration of " & "kuzu_value_create_null" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_null_with_data_type): - proc kuzu_value_create_null_with_data_type*(data_type: ptr kuzu_logical_type_570425812): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_null_with_data_type".} -else: - static : - hint("Declaration of " & "kuzu_value_create_null_with_data_type" & - " already exists, not redeclaring") -when not declared(kuzu_value_is_null): - proc kuzu_value_is_null*(value: ptr kuzu_value_570425816): bool {.cdecl, - importc: "kuzu_value_is_null".} -else: - static : - hint("Declaration of " & "kuzu_value_is_null" & - " already exists, not redeclaring") -when not declared(kuzu_value_set_null): - proc kuzu_value_set_null*(value: ptr kuzu_value_570425816; is_null: bool): void {. - cdecl, importc: "kuzu_value_set_null".} -else: - static : - hint("Declaration of " & "kuzu_value_set_null" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_default): - proc kuzu_value_create_default*(data_type: ptr kuzu_logical_type_570425812): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_default".} -else: - static : - hint("Declaration of " & "kuzu_value_create_default" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_bool): - proc kuzu_value_create_bool*(val_private: bool): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_bool".} -else: - static : - hint("Declaration of " & "kuzu_value_create_bool" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_int8): - proc kuzu_value_create_int8*(val_private: int8): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_int8".} -else: - static : - hint("Declaration of " & "kuzu_value_create_int8" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_int16): - proc kuzu_value_create_int16*(val_private: int16): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_int16".} -else: - static : - hint("Declaration of " & "kuzu_value_create_int16" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_int32): - proc kuzu_value_create_int32*(val_private: int32): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_int32".} -else: - static : - hint("Declaration of " & "kuzu_value_create_int32" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_int64): - proc kuzu_value_create_int64*(val_private: int64): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_int64".} -else: - static : - hint("Declaration of " & "kuzu_value_create_int64" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_uint8): - proc kuzu_value_create_uint8*(val_private: uint8): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_uint8".} -else: - static : - hint("Declaration of " & "kuzu_value_create_uint8" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_uint16): - proc kuzu_value_create_uint16*(val_private: uint16): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_uint16".} -else: - static : - hint("Declaration of " & "kuzu_value_create_uint16" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_uint32): - proc kuzu_value_create_uint32*(val_private: uint32): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_uint32".} -else: - static : - hint("Declaration of " & "kuzu_value_create_uint32" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_uint64): - proc kuzu_value_create_uint64*(val_private: uint64): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_uint64".} -else: - static : - hint("Declaration of " & "kuzu_value_create_uint64" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_int128): - proc kuzu_value_create_int128*(val_private: kuzu_int128_t_570425856): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_int128".} -else: - static : - hint("Declaration of " & "kuzu_value_create_int128" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_float): - proc kuzu_value_create_float*(val_private: cfloat): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_float".} -else: - static : - hint("Declaration of " & "kuzu_value_create_float" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_double): - proc kuzu_value_create_double*(val_private: cdouble): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_double".} -else: - static : - hint("Declaration of " & "kuzu_value_create_double" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_internal_id): - proc kuzu_value_create_internal_id*(val_private: kuzu_internal_id_t_570425820): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_internal_id".} -else: - static : - hint("Declaration of " & "kuzu_value_create_internal_id" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_date): - proc kuzu_value_create_date*(val_private: kuzu_date_t_570425824): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_date".} -else: - static : - hint("Declaration of " & "kuzu_value_create_date" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_timestamp_ns): - proc kuzu_value_create_timestamp_ns*(val_private: kuzu_timestamp_ns_t_570425828): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_timestamp_ns".} -else: - static : - hint("Declaration of " & "kuzu_value_create_timestamp_ns" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_timestamp_ms): - proc kuzu_value_create_timestamp_ms*(val_private: kuzu_timestamp_ms_t_570425832): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_timestamp_ms".} -else: - static : - hint("Declaration of " & "kuzu_value_create_timestamp_ms" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_timestamp_sec): - proc kuzu_value_create_timestamp_sec*(val_private: kuzu_timestamp_sec_t_570425836): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_timestamp_sec".} -else: - static : - hint("Declaration of " & "kuzu_value_create_timestamp_sec" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_timestamp_tz): - proc kuzu_value_create_timestamp_tz*(val_private: kuzu_timestamp_tz_t_570425840): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_timestamp_tz".} -else: - static : - hint("Declaration of " & "kuzu_value_create_timestamp_tz" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_timestamp): - proc kuzu_value_create_timestamp*(val_private: kuzu_timestamp_t_570425844): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_timestamp".} -else: - static : - hint("Declaration of " & "kuzu_value_create_timestamp" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_interval): - proc kuzu_value_create_interval*(val_private: kuzu_interval_t_570425848): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_interval".} -else: - static : - hint("Declaration of " & "kuzu_value_create_interval" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_string): - proc kuzu_value_create_string*(val_private: cstring): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_create_string".} -else: - static : - hint("Declaration of " & "kuzu_value_create_string" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_list): - proc kuzu_value_create_list*(num_elements: uint64; - elements: ptr ptr kuzu_value_570425816; - out_value: ptr ptr kuzu_value_570425816): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_create_list".} -else: - static : - hint("Declaration of " & "kuzu_value_create_list" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_struct): - proc kuzu_value_create_struct*(num_fields: uint64; field_names: ptr cstring; - field_values: ptr ptr kuzu_value_570425816; - out_value: ptr ptr kuzu_value_570425816): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_create_struct".} -else: - static : - hint("Declaration of " & "kuzu_value_create_struct" & - " already exists, not redeclaring") -when not declared(kuzu_value_create_map): - proc kuzu_value_create_map*(num_fields: uint64; keys: ptr ptr kuzu_value_570425816; - values: ptr ptr kuzu_value_570425816; - out_value: ptr ptr kuzu_value_570425816): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_create_map".} -else: - static : - hint("Declaration of " & "kuzu_value_create_map" & - " already exists, not redeclaring") -when not declared(kuzu_value_clone): - proc kuzu_value_clone*(value: ptr kuzu_value_570425816): ptr kuzu_value_570425816 {. - cdecl, importc: "kuzu_value_clone".} -else: - static : - hint("Declaration of " & "kuzu_value_clone" & - " already exists, not redeclaring") -when not declared(kuzu_value_copy): - proc kuzu_value_copy*(value: ptr kuzu_value_570425816; other: ptr kuzu_value_570425816): void {. - cdecl, importc: "kuzu_value_copy".} -else: - static : - hint("Declaration of " & "kuzu_value_copy" & - " already exists, not redeclaring") -when not declared(kuzu_value_destroy): - proc kuzu_value_destroy*(value: ptr kuzu_value_570425816): void {.cdecl, - importc: "kuzu_value_destroy".} -else: - static : - hint("Declaration of " & "kuzu_value_destroy" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_list_size): - proc kuzu_value_get_list_size*(value: ptr kuzu_value_570425816; - out_result: ptr uint64): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_list_size".} -else: - static : - hint("Declaration of " & "kuzu_value_get_list_size" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_list_element): - proc kuzu_value_get_list_element*(value: ptr kuzu_value_570425816; - index: uint64; out_value: ptr kuzu_value_570425816): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_list_element".} -else: - static : - hint("Declaration of " & "kuzu_value_get_list_element" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_struct_num_fields): - proc kuzu_value_get_struct_num_fields*(value: ptr kuzu_value_570425816; - out_result: ptr uint64): kuzu_state_570425864 {.cdecl, - importc: "kuzu_value_get_struct_num_fields".} -else: - static : - hint("Declaration of " & "kuzu_value_get_struct_num_fields" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_struct_field_name): - proc kuzu_value_get_struct_field_name*(value: ptr kuzu_value_570425816; - index: uint64; out_result: ptr cstring): kuzu_state_570425864 {.cdecl, - importc: "kuzu_value_get_struct_field_name".} -else: - static : - hint("Declaration of " & "kuzu_value_get_struct_field_name" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_struct_field_value): - proc kuzu_value_get_struct_field_value*(value: ptr kuzu_value_570425816; - index: uint64; out_value: ptr kuzu_value_570425816): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_struct_field_value".} -else: - static : - hint("Declaration of " & "kuzu_value_get_struct_field_value" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_map_size): - proc kuzu_value_get_map_size*(value: ptr kuzu_value_570425816; - out_result: ptr uint64): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_map_size".} -else: - static : - hint("Declaration of " & "kuzu_value_get_map_size" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_map_key): - proc kuzu_value_get_map_key*(value: ptr kuzu_value_570425816; index: uint64; - out_key: ptr kuzu_value_570425816): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_map_key".} -else: - static : - hint("Declaration of " & "kuzu_value_get_map_key" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_map_value): - proc kuzu_value_get_map_value*(value: ptr kuzu_value_570425816; index: uint64; - out_value: ptr kuzu_value_570425816): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_map_value".} -else: - static : - hint("Declaration of " & "kuzu_value_get_map_value" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_recursive_rel_node_list): - proc kuzu_value_get_recursive_rel_node_list*(value: ptr kuzu_value_570425816; - out_value: ptr kuzu_value_570425816): kuzu_state_570425864 {.cdecl, - importc: "kuzu_value_get_recursive_rel_node_list".} -else: - static : - hint("Declaration of " & "kuzu_value_get_recursive_rel_node_list" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_recursive_rel_rel_list): - proc kuzu_value_get_recursive_rel_rel_list*(value: ptr kuzu_value_570425816; - out_value: ptr kuzu_value_570425816): kuzu_state_570425864 {.cdecl, - importc: "kuzu_value_get_recursive_rel_rel_list".} -else: - static : - hint("Declaration of " & "kuzu_value_get_recursive_rel_rel_list" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_data_type): - proc kuzu_value_get_data_type*(value: ptr kuzu_value_570425816; - out_type: ptr kuzu_logical_type_570425812): void {. - cdecl, importc: "kuzu_value_get_data_type".} -else: - static : - hint("Declaration of " & "kuzu_value_get_data_type" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_bool): - proc kuzu_value_get_bool*(value: ptr kuzu_value_570425816; - out_result: ptr bool): kuzu_state_570425864 {.cdecl, - importc: "kuzu_value_get_bool".} -else: - static : - hint("Declaration of " & "kuzu_value_get_bool" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_int8): - proc kuzu_value_get_int8*(value: ptr kuzu_value_570425816; - out_result: ptr int8): kuzu_state_570425864 {.cdecl, - importc: "kuzu_value_get_int8".} -else: - static : - hint("Declaration of " & "kuzu_value_get_int8" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_int16): - proc kuzu_value_get_int16*(value: ptr kuzu_value_570425816; - out_result: ptr int16): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_int16".} -else: - static : - hint("Declaration of " & "kuzu_value_get_int16" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_int32): - proc kuzu_value_get_int32*(value: ptr kuzu_value_570425816; - out_result: ptr int32): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_int32".} -else: - static : - hint("Declaration of " & "kuzu_value_get_int32" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_int64): - proc kuzu_value_get_int64*(value: ptr kuzu_value_570425816; - out_result: ptr int64): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_int64".} -else: - static : - hint("Declaration of " & "kuzu_value_get_int64" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_uint8): - proc kuzu_value_get_uint8*(value: ptr kuzu_value_570425816; - out_result: ptr uint8): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_uint8".} -else: - static : - hint("Declaration of " & "kuzu_value_get_uint8" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_uint16): - proc kuzu_value_get_uint16*(value: ptr kuzu_value_570425816; - out_result: ptr uint16): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_uint16".} -else: - static : - hint("Declaration of " & "kuzu_value_get_uint16" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_uint32): - proc kuzu_value_get_uint32*(value: ptr kuzu_value_570425816; - out_result: ptr uint32): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_uint32".} -else: - static : - hint("Declaration of " & "kuzu_value_get_uint32" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_uint64): - proc kuzu_value_get_uint64*(value: ptr kuzu_value_570425816; - out_result: ptr uint64): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_uint64".} -else: - static : - hint("Declaration of " & "kuzu_value_get_uint64" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_int128): - proc kuzu_value_get_int128*(value: ptr kuzu_value_570425816; - out_result: ptr kuzu_int128_t_570425856): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_int128".} -else: - static : - hint("Declaration of " & "kuzu_value_get_int128" & - " already exists, not redeclaring") -when not declared(kuzu_int128_t_from_string): - proc kuzu_int128_t_from_string*(str: cstring; out_result: ptr kuzu_int128_t_570425856): kuzu_state_570425864 {. - cdecl, importc: "kuzu_int128_t_from_string".} -else: - static : - hint("Declaration of " & "kuzu_int128_t_from_string" & - " already exists, not redeclaring") -when not declared(kuzu_int128_t_to_string): - proc kuzu_int128_t_to_string*(val: kuzu_int128_t_570425856; - out_result: ptr cstring): kuzu_state_570425864 {. - cdecl, importc: "kuzu_int128_t_to_string".} -else: - static : - hint("Declaration of " & "kuzu_int128_t_to_string" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_float): - proc kuzu_value_get_float*(value: ptr kuzu_value_570425816; - out_result: ptr cfloat): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_float".} -else: - static : - hint("Declaration of " & "kuzu_value_get_float" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_double): - proc kuzu_value_get_double*(value: ptr kuzu_value_570425816; - out_result: ptr cdouble): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_double".} -else: - static : - hint("Declaration of " & "kuzu_value_get_double" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_internal_id): - proc kuzu_value_get_internal_id*(value: ptr kuzu_value_570425816; - out_result: ptr kuzu_internal_id_t_570425820): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_internal_id".} -else: - static : - hint("Declaration of " & "kuzu_value_get_internal_id" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_date): - proc kuzu_value_get_date*(value: ptr kuzu_value_570425816; - out_result: ptr kuzu_date_t_570425824): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_date".} -else: - static : - hint("Declaration of " & "kuzu_value_get_date" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_timestamp): - proc kuzu_value_get_timestamp*(value: ptr kuzu_value_570425816; - out_result: ptr kuzu_timestamp_t_570425844): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_timestamp".} -else: - static : - hint("Declaration of " & "kuzu_value_get_timestamp" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_timestamp_ns): - proc kuzu_value_get_timestamp_ns*(value: ptr kuzu_value_570425816; - out_result: ptr kuzu_timestamp_ns_t_570425828): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_timestamp_ns".} -else: - static : - hint("Declaration of " & "kuzu_value_get_timestamp_ns" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_timestamp_ms): - proc kuzu_value_get_timestamp_ms*(value: ptr kuzu_value_570425816; - out_result: ptr kuzu_timestamp_ms_t_570425832): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_timestamp_ms".} -else: - static : - hint("Declaration of " & "kuzu_value_get_timestamp_ms" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_timestamp_sec): - proc kuzu_value_get_timestamp_sec*(value: ptr kuzu_value_570425816; - out_result: ptr kuzu_timestamp_sec_t_570425836): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_timestamp_sec".} -else: - static : - hint("Declaration of " & "kuzu_value_get_timestamp_sec" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_timestamp_tz): - proc kuzu_value_get_timestamp_tz*(value: ptr kuzu_value_570425816; - out_result: ptr kuzu_timestamp_tz_t_570425840): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_timestamp_tz".} -else: - static : - hint("Declaration of " & "kuzu_value_get_timestamp_tz" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_interval): - proc kuzu_value_get_interval*(value: ptr kuzu_value_570425816; - out_result: ptr kuzu_interval_t_570425848): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_interval".} -else: - static : - hint("Declaration of " & "kuzu_value_get_interval" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_decimal_as_string): - proc kuzu_value_get_decimal_as_string*(value: ptr kuzu_value_570425816; - out_result: ptr cstring): kuzu_state_570425864 {.cdecl, - importc: "kuzu_value_get_decimal_as_string".} -else: - static : - hint("Declaration of " & "kuzu_value_get_decimal_as_string" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_string): - proc kuzu_value_get_string*(value: ptr kuzu_value_570425816; - out_result: ptr cstring): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_string".} -else: - static : - hint("Declaration of " & "kuzu_value_get_string" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_blob): - proc kuzu_value_get_blob*(value: ptr kuzu_value_570425816; - out_result: ptr ptr uint8): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_blob".} -else: - static : - hint("Declaration of " & "kuzu_value_get_blob" & - " already exists, not redeclaring") -when not declared(kuzu_value_get_uuid): - proc kuzu_value_get_uuid*(value: ptr kuzu_value_570425816; - out_result: ptr cstring): kuzu_state_570425864 {. - cdecl, importc: "kuzu_value_get_uuid".} -else: - static : - hint("Declaration of " & "kuzu_value_get_uuid" & - " already exists, not redeclaring") -when not declared(kuzu_value_to_string): - proc kuzu_value_to_string*(value: ptr kuzu_value_570425816): cstring {.cdecl, - importc: "kuzu_value_to_string".} -else: - static : - hint("Declaration of " & "kuzu_value_to_string" & - " already exists, not redeclaring") -when not declared(kuzu_node_val_get_id_val): - proc kuzu_node_val_get_id_val*(node_val: ptr kuzu_value_570425816; - out_value: ptr kuzu_value_570425816): kuzu_state_570425864 {. - cdecl, importc: "kuzu_node_val_get_id_val".} -else: - static : - hint("Declaration of " & "kuzu_node_val_get_id_val" & - " already exists, not redeclaring") -when not declared(kuzu_node_val_get_label_val): - proc kuzu_node_val_get_label_val*(node_val: ptr kuzu_value_570425816; - out_value: ptr kuzu_value_570425816): kuzu_state_570425864 {. - cdecl, importc: "kuzu_node_val_get_label_val".} -else: - static : - hint("Declaration of " & "kuzu_node_val_get_label_val" & - " already exists, not redeclaring") -when not declared(kuzu_node_val_get_property_size): - proc kuzu_node_val_get_property_size*(node_val: ptr kuzu_value_570425816; - out_value: ptr uint64): kuzu_state_570425864 {. - cdecl, importc: "kuzu_node_val_get_property_size".} -else: - static : - hint("Declaration of " & "kuzu_node_val_get_property_size" & - " already exists, not redeclaring") -when not declared(kuzu_node_val_get_property_name_at): - proc kuzu_node_val_get_property_name_at*(node_val: ptr kuzu_value_570425816; - index: uint64; out_result: ptr cstring): kuzu_state_570425864 {.cdecl, - importc: "kuzu_node_val_get_property_name_at".} -else: - static : - hint("Declaration of " & "kuzu_node_val_get_property_name_at" & - " already exists, not redeclaring") -when not declared(kuzu_node_val_get_property_value_at): - proc kuzu_node_val_get_property_value_at*(node_val: ptr kuzu_value_570425816; - index: uint64; out_value: ptr kuzu_value_570425816): kuzu_state_570425864 {. - cdecl, importc: "kuzu_node_val_get_property_value_at".} -else: - static : - hint("Declaration of " & "kuzu_node_val_get_property_value_at" & - " already exists, not redeclaring") -when not declared(kuzu_node_val_to_string): - proc kuzu_node_val_to_string*(node_val: ptr kuzu_value_570425816; - out_result: ptr cstring): kuzu_state_570425864 {. - cdecl, importc: "kuzu_node_val_to_string".} -else: - static : - hint("Declaration of " & "kuzu_node_val_to_string" & - " already exists, not redeclaring") -when not declared(kuzu_rel_val_get_id_val): - proc kuzu_rel_val_get_id_val*(rel_val: ptr kuzu_value_570425816; - out_value: ptr kuzu_value_570425816): kuzu_state_570425864 {. - cdecl, importc: "kuzu_rel_val_get_id_val".} -else: - static : - hint("Declaration of " & "kuzu_rel_val_get_id_val" & - " already exists, not redeclaring") -when not declared(kuzu_rel_val_get_src_id_val): - proc kuzu_rel_val_get_src_id_val*(rel_val: ptr kuzu_value_570425816; - out_value: ptr kuzu_value_570425816): kuzu_state_570425864 {. - cdecl, importc: "kuzu_rel_val_get_src_id_val".} -else: - static : - hint("Declaration of " & "kuzu_rel_val_get_src_id_val" & - " already exists, not redeclaring") -when not declared(kuzu_rel_val_get_dst_id_val): - proc kuzu_rel_val_get_dst_id_val*(rel_val: ptr kuzu_value_570425816; - out_value: ptr kuzu_value_570425816): kuzu_state_570425864 {. - cdecl, importc: "kuzu_rel_val_get_dst_id_val".} -else: - static : - hint("Declaration of " & "kuzu_rel_val_get_dst_id_val" & - " already exists, not redeclaring") -when not declared(kuzu_rel_val_get_label_val): - proc kuzu_rel_val_get_label_val*(rel_val: ptr kuzu_value_570425816; - out_value: ptr kuzu_value_570425816): kuzu_state_570425864 {. - cdecl, importc: "kuzu_rel_val_get_label_val".} -else: - static : - hint("Declaration of " & "kuzu_rel_val_get_label_val" & - " already exists, not redeclaring") -when not declared(kuzu_rel_val_get_property_size): - proc kuzu_rel_val_get_property_size*(rel_val: ptr kuzu_value_570425816; - out_value: ptr uint64): kuzu_state_570425864 {. - cdecl, importc: "kuzu_rel_val_get_property_size".} -else: - static : - hint("Declaration of " & "kuzu_rel_val_get_property_size" & - " already exists, not redeclaring") -when not declared(kuzu_rel_val_get_property_name_at): - proc kuzu_rel_val_get_property_name_at*(rel_val: ptr kuzu_value_570425816; - index: uint64; out_result: ptr cstring): kuzu_state_570425864 {.cdecl, - importc: "kuzu_rel_val_get_property_name_at".} -else: - static : - hint("Declaration of " & "kuzu_rel_val_get_property_name_at" & - " already exists, not redeclaring") -when not declared(kuzu_rel_val_get_property_value_at): - proc kuzu_rel_val_get_property_value_at*(rel_val: ptr kuzu_value_570425816; - index: uint64; out_value: ptr kuzu_value_570425816): kuzu_state_570425864 {. - cdecl, importc: "kuzu_rel_val_get_property_value_at".} -else: - static : - hint("Declaration of " & "kuzu_rel_val_get_property_value_at" & - " already exists, not redeclaring") -when not declared(kuzu_rel_val_to_string): - proc kuzu_rel_val_to_string*(rel_val: ptr kuzu_value_570425816; - out_result: ptr cstring): kuzu_state_570425864 {. - cdecl, importc: "kuzu_rel_val_to_string".} -else: - static : - hint("Declaration of " & "kuzu_rel_val_to_string" & - " already exists, not redeclaring") -when not declared(kuzu_destroy_string): - proc kuzu_destroy_string*(str: cstring): void {.cdecl, - importc: "kuzu_destroy_string".} -else: - static : - hint("Declaration of " & "kuzu_destroy_string" & - " already exists, not redeclaring") -when not declared(kuzu_destroy_blob): - proc kuzu_destroy_blob*(blob: ptr uint8): void {.cdecl, - importc: "kuzu_destroy_blob".} -else: - static : - hint("Declaration of " & "kuzu_destroy_blob" & - " already exists, not redeclaring") -when not declared(kuzu_query_summary_destroy): - proc kuzu_query_summary_destroy*(query_summary: ptr kuzu_query_summary_570425852): void {. - cdecl, importc: "kuzu_query_summary_destroy".} -else: - static : - hint("Declaration of " & "kuzu_query_summary_destroy" & - " already exists, not redeclaring") -when not declared(kuzu_query_summary_get_compiling_time): - proc kuzu_query_summary_get_compiling_time*( - query_summary: ptr kuzu_query_summary_570425852): cdouble {.cdecl, - importc: "kuzu_query_summary_get_compiling_time".} -else: - static : - hint("Declaration of " & "kuzu_query_summary_get_compiling_time" & - " already exists, not redeclaring") -when not declared(kuzu_query_summary_get_execution_time): - proc kuzu_query_summary_get_execution_time*( - query_summary: ptr kuzu_query_summary_570425852): cdouble {.cdecl, - importc: "kuzu_query_summary_get_execution_time".} -else: - static : - hint("Declaration of " & "kuzu_query_summary_get_execution_time" & - " already exists, not redeclaring") -when not declared(kuzu_timestamp_ns_to_tm): - proc kuzu_timestamp_ns_to_tm*(timestamp: kuzu_timestamp_ns_t_570425828; - out_result: ptr struct_tm_570425866): kuzu_state_570425864 {. - cdecl, importc: "kuzu_timestamp_ns_to_tm".} -else: - static : - hint("Declaration of " & "kuzu_timestamp_ns_to_tm" & - " already exists, not redeclaring") -when not declared(kuzu_timestamp_ms_to_tm): - proc kuzu_timestamp_ms_to_tm*(timestamp: kuzu_timestamp_ms_t_570425832; - out_result: ptr struct_tm_570425866): kuzu_state_570425864 {. - cdecl, importc: "kuzu_timestamp_ms_to_tm".} -else: - static : - hint("Declaration of " & "kuzu_timestamp_ms_to_tm" & - " already exists, not redeclaring") -when not declared(kuzu_timestamp_sec_to_tm): - proc kuzu_timestamp_sec_to_tm*(timestamp: kuzu_timestamp_sec_t_570425836; - out_result: ptr struct_tm_570425866): kuzu_state_570425864 {. - cdecl, importc: "kuzu_timestamp_sec_to_tm".} -else: - static : - hint("Declaration of " & "kuzu_timestamp_sec_to_tm" & - " already exists, not redeclaring") -when not declared(kuzu_timestamp_tz_to_tm): - proc kuzu_timestamp_tz_to_tm*(timestamp: kuzu_timestamp_tz_t_570425840; - out_result: ptr struct_tm_570425866): kuzu_state_570425864 {. - cdecl, importc: "kuzu_timestamp_tz_to_tm".} -else: - static : - hint("Declaration of " & "kuzu_timestamp_tz_to_tm" & - " already exists, not redeclaring") -when not declared(kuzu_timestamp_to_tm): - proc kuzu_timestamp_to_tm*(timestamp: kuzu_timestamp_t_570425844; - out_result: ptr struct_tm_570425866): kuzu_state_570425864 {. - cdecl, importc: "kuzu_timestamp_to_tm".} -else: - static : - hint("Declaration of " & "kuzu_timestamp_to_tm" & - " already exists, not redeclaring") -when not declared(kuzu_timestamp_ns_from_tm): - proc kuzu_timestamp_ns_from_tm*(tm: struct_tm_570425866; - out_result: ptr kuzu_timestamp_ns_t_570425828): kuzu_state_570425864 {. - cdecl, importc: "kuzu_timestamp_ns_from_tm".} -else: - static : - hint("Declaration of " & "kuzu_timestamp_ns_from_tm" & - " already exists, not redeclaring") -when not declared(kuzu_timestamp_ms_from_tm): - proc kuzu_timestamp_ms_from_tm*(tm: struct_tm_570425866; - out_result: ptr kuzu_timestamp_ms_t_570425832): kuzu_state_570425864 {. - cdecl, importc: "kuzu_timestamp_ms_from_tm".} -else: - static : - hint("Declaration of " & "kuzu_timestamp_ms_from_tm" & - " already exists, not redeclaring") -when not declared(kuzu_timestamp_sec_from_tm): - proc kuzu_timestamp_sec_from_tm*(tm: struct_tm_570425866; - out_result: ptr kuzu_timestamp_sec_t_570425836): kuzu_state_570425864 {. - cdecl, importc: "kuzu_timestamp_sec_from_tm".} -else: - static : - hint("Declaration of " & "kuzu_timestamp_sec_from_tm" & - " already exists, not redeclaring") -when not declared(kuzu_timestamp_tz_from_tm): - proc kuzu_timestamp_tz_from_tm*(tm: struct_tm_570425866; - out_result: ptr kuzu_timestamp_tz_t_570425840): kuzu_state_570425864 {. - cdecl, importc: "kuzu_timestamp_tz_from_tm".} -else: - static : - hint("Declaration of " & "kuzu_timestamp_tz_from_tm" & - " already exists, not redeclaring") -when not declared(kuzu_timestamp_from_tm): - proc kuzu_timestamp_from_tm*(tm: struct_tm_570425866; - out_result: ptr kuzu_timestamp_t_570425844): kuzu_state_570425864 {. - cdecl, importc: "kuzu_timestamp_from_tm".} -else: - static : - hint("Declaration of " & "kuzu_timestamp_from_tm" & - " already exists, not redeclaring") -when not declared(kuzu_date_to_string): - proc kuzu_date_to_string*(date: kuzu_date_t_570425824; out_result: ptr cstring): kuzu_state_570425864 {. - cdecl, importc: "kuzu_date_to_string".} -else: - static : - hint("Declaration of " & "kuzu_date_to_string" & - " already exists, not redeclaring") -when not declared(kuzu_date_from_string): - proc kuzu_date_from_string*(str: cstring; out_result: ptr kuzu_date_t_570425824): kuzu_state_570425864 {. - cdecl, importc: "kuzu_date_from_string".} -else: - static : - hint("Declaration of " & "kuzu_date_from_string" & - " already exists, not redeclaring") -when not declared(kuzu_date_to_tm): - proc kuzu_date_to_tm*(date: kuzu_date_t_570425824; out_result: ptr struct_tm_570425866): kuzu_state_570425864 {. - cdecl, importc: "kuzu_date_to_tm".} -else: - static : - hint("Declaration of " & "kuzu_date_to_tm" & - " already exists, not redeclaring") -when not declared(kuzu_date_from_tm): - proc kuzu_date_from_tm*(tm: struct_tm_570425866; out_result: ptr kuzu_date_t_570425824): kuzu_state_570425864 {. - cdecl, importc: "kuzu_date_from_tm".} -else: - static : - hint("Declaration of " & "kuzu_date_from_tm" & - " already exists, not redeclaring") -when not declared(kuzu_interval_to_difftime): - proc kuzu_interval_to_difftime*(interval: kuzu_interval_t_570425848; - out_result: ptr cdouble): void {.cdecl, - importc: "kuzu_interval_to_difftime".} -else: - static : - hint("Declaration of " & "kuzu_interval_to_difftime" & - " already exists, not redeclaring") -when not declared(kuzu_interval_from_difftime): - proc kuzu_interval_from_difftime*(difftime: cdouble; - out_result: ptr kuzu_interval_t_570425848): void {. - cdecl, importc: "kuzu_interval_from_difftime".} -else: - static : - hint("Declaration of " & "kuzu_interval_from_difftime" & - " already exists, not redeclaring") -when not declared(kuzu_get_version): - proc kuzu_get_version*(): cstring {.cdecl, importc: "kuzu_get_version".} -else: - static : - hint("Declaration of " & "kuzu_get_version" & - " already exists, not redeclaring") -when not declared(kuzu_get_storage_version): - proc kuzu_get_storage_version*(): uint64 {.cdecl, - importc: "kuzu_get_storage_version".} -else: - static : - hint("Declaration of " & "kuzu_get_storage_version" & - " already exists, not redeclaring") \ No newline at end of file diff --git a/src/kuzu/config.nim b/src/kuzu/config.nim deleted file mode 100644 index c8bc4b5..0000000 --- a/src/kuzu/config.nim +++ /dev/null @@ -1,24 +0,0 @@ -# vim: set et sta sw=4 ts=4 : - -func kuzuConfig*( - buffer_pool_size = KUZU_DEFAULT_CONFIG.buffer_pool_size, - max_num_threads = KUZU_DEFAULT_CONFIG.max_num_threads, - enable_compression = KUZU_DEFAULT_CONFIG.enable_compression, - read_only = KUZU_DEFAULT_CONFIG.read_only, - max_db_size = KUZU_DEFAULT_CONFIG.max_db_size, - auto_checkpoint = KUZU_DEFAULT_CONFIG.auto_checkpoint, - checkpoint_threshold = KUZU_DEFAULT_CONFIG.checkpoint_threshold - ): kuzu_system_config = - ## Returns a new kuzu database configuration object. - - return kuzu_system_config( - buffer_pool_size: buffer_pool_size, - max_num_threads: max_num_threads, - enable_compression: enable_compression, - read_only: read_only, - max_db_size: max_db_size, - auto_checkpoint: auto_checkpoint, - checkpoint_threshold: checkpoint_threshold - ) - - diff --git a/src/kuzu/connection.nim b/src/kuzu/connection.nim deleted file mode 100644 index 0907a98..0000000 --- a/src/kuzu/connection.nim +++ /dev/null @@ -1,27 +0,0 @@ -# vim: set et sta sw=4 ts=4 : - -proc `=destroy`*( conn: KuzuConnectionObj ) = - ## Graceful cleanup for open connection handles. - if conn.valid: - when defined( debug ): echo &"Destroying connection: {conn}" - kuzu_connection_destroy( addr conn.handle ) - - -func connect*( db: KuzuDatabase ): KuzuConnection = - ## Connect to a database. - result = new KuzuConnection - if kuzu_connection_init( addr db.handle, addr result.handle ) == KuzuSuccess: - result.valid = true - else: - raise newException( KuzuException, "Unable to connect to the database." ) - - -func queryTimeout*( conn: KuzuConnection, timeout: uint64 ) = - ## Set a maximum time limit (in milliseconds) for query runtime. - discard kuzu_connection_set_query_timeout( addr conn.handle, timeout ) - - -func queryInterrupt*( conn: KuzuConnection ) = - ## Cancel any running queries. - kuzu_connection_interrupt( addr conn.handle ) - diff --git a/src/kuzu/constants.nim b/src/kuzu/constants.nim deleted file mode 100644 index 42d9940..0000000 --- a/src/kuzu/constants.nim +++ /dev/null @@ -1,8 +0,0 @@ -# vim: set et sta sw=4 ts=4 : - -const KUZU_VERSION* = "0.6.2" -const KUZU_EXPECTED_LIBVERSION* = "0.11.3" -const BLOB_MAXSIZE = 4096 - -let KUZU_DEFAULT_CONFIG* = kuzu_default_system_config() - diff --git a/src/kuzu/queries.nim b/src/kuzu/queries.nim deleted file mode 100644 index 71058bb..0000000 --- a/src/kuzu/queries.nim +++ /dev/null @@ -1,197 +0,0 @@ -# vim: set et sta sw=4 ts=4 : - -proc `=destroy`*( query: KuzuQueryResultObj ) = - ## Graceful cleanup for out of scope query objects. - if query.valid: - when defined( debug ): echo &"Destroying query: {query}" - kuzu_query_result_destroy( addr query.handle ) - - -# Forward declarations. -func hasNextSet( query: KuzuQueryResult ): bool -func getNextSet( query: KuzuQueryResult ): KuzuQueryResult - - -func getQueryMetadata( query: KuzuQueryResult, getAllQueryResults=false ) = - ## Find and retain additional data for the query. - query.num_columns = kuzu_query_result_get_num_columns( addr query.handle ) - query.num_tuples = kuzu_query_result_get_num_tuples( addr query.handle ) - - # Summary information. - var summary: kuzu_query_summary - discard kuzu_query_result_get_query_summary( addr query.handle, addr summary ) - query.compile_time = kuzu_query_summary_get_compiling_time( addr summary ) - query.execution_time = kuzu_query_summary_get_execution_time( addr summary ) - kuzu_query_summary_destroy( addr summary ) - - # Pull any additional query results. - query.sets = @[] - if getAllQueryResults: - while query.hasNextSet: - query.sets.add( query.getNextSet ) - - # Column information. - query.column_types = @[] - query.column_names = @[] - if query.num_columns == 0: return - for idx in ( 0 .. query.num_columns-1 ): - - # types - # - var logical_type: kuzu_logical_type - discard kuzu_query_result_get_column_data_type( - addr query.handle, - idx, - addr logical_type - ) - query.column_types.add( kuzu_data_type_get_id( addr logical_type )) - kuzu_data_type_destroy( addr logical_type ) - - # names - # - var name: cstring - discard kuzu_query_result_get_column_name( - addr query.handle, - idx, - addr name - ) - query.column_names.add( $name ) - kuzu_destroy_string( name ) - - -func hasNextSet( query: KuzuQueryResult ): bool = - ## Returns +true+ if there are more result sets to be consumed. - result = kuzu_query_result_has_next_query_result( addr query.handle ) - - -func getNextSet( query: KuzuQueryResult ): KuzuQueryResult = - ## Consume and return the next query set result, or raise a KuzuIterationError - ## if at the end of sets. - result = new KuzuQueryResult - if kuzu_query_result_get_next_query_result( addr query.handle, addr result.handle ) == KuzuSuccess: - result.valid = true - result.getQueryMetadata() - else: - raise newException( KuzuIterationError, &"Query iteration past end of set." ) - - -func query*( conn: KuzuConnection, query: string ): KuzuQueryResult = - ## Perform a database +query+ and return the result. - result = new KuzuQueryResult - - if kuzu_connection_query( addr conn.handle, query, addr result.handle ) == KuzuSuccess: - result.valid = true - result.getQueryMetadata( getAllQueryResults=true ) - else: - var err = kuzu_query_result_get_error_message( addr result.handle ) - raise newException( KuzuQueryError, &"Error running query: {err}" ) - - -proc `=destroy`*( prepared: KuzuPreparedStatementObj ) = - ## Graceful cleanup for out of scope prepared objects. - if prepared.valid: - when defined( debug ): echo &"Destroying prepared statement: {prepared}" - kuzu_prepared_statement_destroy( addr prepared.handle ) - - -func prepare*( conn: KuzuConnection, query: string ): KuzuPreparedStatement = - ## Return a prepared statement that can avoid planning for repeat calls, - ## with optional variable binding via #execute. - result = new KuzuPreparedStatement - if kuzu_connection_prepare( addr conn.handle, query, addr result.handle ) == KuzuSuccess: - result.conn = conn - result.valid = true - else: - var err = kuzu_prepared_statement_get_error_message( addr result.handle ) - raise newException( KuzuQueryError, &"Error preparing statement: {err}" ) - - -func bindValue[T]( - stmtHandle: kuzu_prepared_statement, - key: cstring, - val: T -) = - ## Bind a key/value to a prepared statement handle. - when typeOf( val ) is bool: - assert( kuzu_prepared_statement_bind_bool( addr stmtHandle, key, val ) == KuzuSuccess ) - elif typeOf( val ) is int8: - assert( kuzu_prepared_statement_bind_int8( addr stmtHandle, key, val ) == KuzuSuccess ) - elif typeOf( val ) is int16: - assert( kuzu_prepared_statement_bind_int16( addr stmtHandle, key, val ) == KuzuSuccess ) - elif typeOf( val ) is int64: - assert( kuzu_prepared_statement_bind_int64( addr stmtHandle, key, val ) == KuzuSuccess ) - elif typeOf( val ) is int or typeOf( val ) is int32: - assert( kuzu_prepared_statement_bind_int32( addr stmtHandle, key, val.int32 ) == KuzuSuccess ) - elif typeOf( val ) is uint8: - assert( kuzu_prepared_statement_bind_uint8( addr stmtHandle, key, val ) == KuzuSuccess ) - elif typeOf( val ) is uint16: - assert( kuzu_prepared_statement_bind_uint16( addr stmtHandle, key, val ) == KuzuSuccess ) - elif typeOf( val ) is uint64: - assert( kuzu_prepared_statement_bind_uint64( addr stmtHandle, key, val ) == KuzuSuccess ) - elif typeOf( val ) is uint or typeOf( val ) is uint32: - assert( kuzu_prepared_statement_bind_uint32( addr stmtHandle, key, val.uint32 ) == KuzuSuccess ) - elif typeOf( val ) is float: - assert( kuzu_prepared_statement_bind_double( addr stmtHandle, key, val ) == KuzuSuccess ) - elif typeOf( val ) is string: - # Fallback to string. For custom types, just cast in the cypher query. - assert( kuzu_prepared_statement_bind_string( addr stmtHandle, key, val.cstring ) == KuzuSuccess ) - else: - raise newException( KuzuTypeError, &"""Unsupported type {$typeOf(val)} for prepared statement.""" ) - - -proc execute*( - prepared: KuzuPreparedStatement, - params: tuple = () -): KuzuQueryResult = - ## Bind variables in *params* to the statement, and return - ## a KuzuQueryResult. - - result = new KuzuQueryResult - - for key, val in params.fieldPairs: - prepared.handle.bindValue( key, val ) - - if kuzu_connection_execute( - addr prepared.conn.handle, - addr prepared.handle, - addr result.handle - ) == KuzuSuccess: - result.valid = false - result.getQueryMetadata() - else: - var err = kuzu_query_result_get_error_message( addr result.handle ) - raise newException( KuzuQueryError, &"Error executing prepared statement: {err}" ) - - -func `$`*( query: KuzuQueryResult ): string = - ## Return the entire result set as a string. - result = $kuzu_query_result_to_string( addr query.handle ) - - -func hasNext*( query: KuzuQueryResult ): bool = - ## Returns +true+ if there are more tuples to be consumed. - result = kuzu_query_result_has_next( addr query.handle ) - - -func getNext*( query: KuzuQueryResult ): KuzuFlatTuple = - ## Consume and return the next tuple result, or raise a KuzuIterationError - ## if at the end of the result tuples. - result = new KuzuFlatTuple - if kuzu_query_result_get_next( addr query.handle, addr result.handle ) == KuzuSuccess: - result.valid = true - result.num_columns = query.num_columns - else: - raise newException( KuzuIterationError, &"Query iteration past end of tuples." ) - - -func rewind*( query: KuzuQueryResult ) = - ## Reset query iteration back to the beginning. - kuzu_query_result_reset_iterator( addr query.handle ) - - -iterator items*( query: KuzuQueryResult ): KuzuFlatTuple = - ## Iterate available tuples, yielding to the block. - while query.hasNext: - yield query.getNext - query.rewind - diff --git a/src/kuzu/tuple.nim b/src/kuzu/tuple.nim deleted file mode 100644 index 54ad857..0000000 --- a/src/kuzu/tuple.nim +++ /dev/null @@ -1,30 +0,0 @@ -# vim: set et sta sw=4 ts=4 : - -# NOTE: Constructor in queries.nim, #getNext - -proc `=destroy`*( tpl: KuzuFlatTupleObj ) = - ## Graceful cleanup for out of scope tuples. - if tpl.valid: - when defined( debug ): echo &"Destroying tuple: {tpl}" - kuzu_flat_tuple_destroy( addr tpl.handle ) - - -func `$`*( tpl: KuzuFlatTuple ): string = - ## Stringify a tuple. - result = $kuzu_flat_tuple_to_string( addr tpl.handle ) - result.removeSuffix( "\n" ) - - -func `[]`*( tpl: KuzuFlatTuple, idx: int|uint64 ): KuzuValue = - ## Returns a KuzuValue at the given *idx*. - - result = new KuzuValue - - if kuzu_flat_tuple_get_value( addr tpl.handle, idx.uint64, addr result.handle ) == KuzuSuccess: - result.valid = true - result.getType() - else: - raise newException( KuzuIndexError, - &"Unable to fetch tuple value at idx {idx}. ({tpl.num_columns} column(s).)" ) - - diff --git a/src/kuzu/types.nim b/src/kuzu/types.nim deleted file mode 100644 index 24feb78..0000000 --- a/src/kuzu/types.nim +++ /dev/null @@ -1,61 +0,0 @@ -# vim: set et sta sw=4 ts=4 : - -type - KuzuDBType* = enum - disk, memory - - KuzuDatabaseObj = object - handle: kuzu_database - path*: string - kind*: KuzuDBType - config*: kuzu_system_config - valid = false - KuzuDatabase* = ref KuzuDatabaseObj - - KuzuConnectionObj = object - handle: kuzu_connection - valid = false - KuzuConnection* = ref KuzuConnectionObj - - KuzuQueryResultObj = object - handle: kuzu_query_result - num_columns*: uint64 = 0 - num_tuples*: uint64 = 0 - compile_time*: cdouble = 0 - execution_time*: cdouble = 0 - column_types*: seq[ kuzu_data_type_id ] - column_names*: seq[ string ] - sets*: seq[ KuzuQueryResult ] - valid = false - KuzuQueryResult* = ref KuzuQueryResultObj - - KuzuPreparedStatementObj = object - handle: kuzu_prepared_statement - conn: KuzuConnection - valid = false - KuzuPreparedStatement* = ref KuzuPreparedStatementObj - - KuzuFlatTupleObj = object - handle: kuzu_flat_tuple - num_columns: uint64 = 0 - valid = false - KuzuFlatTuple* = ref KuzuFlatTupleObj - - KuzuValueObj = object - handle: kuzu_value - valid = false - kind*: kuzu_data_type_id - KuzuValue* = ref KuzuValueObj - - KuzuStructValueObj = object - value: KuzuValue - len*: uint64 - keys*: seq[ string ] - KuzuStructValue* = ref KuzuStructValueObj - - KuzuException* = object of CatchableError - KuzuQueryError* = object of KuzuException - KuzuIndexError* = object of KuzuException - KuzuIterationError* = object of KuzuException - KuzuTypeError* = object of KuzuException - diff --git a/src/kuzu/value.nim b/src/kuzu/value.nim deleted file mode 100644 index 4e581a5..0000000 --- a/src/kuzu/value.nim +++ /dev/null @@ -1,197 +0,0 @@ -# vim: set et sta sw=4 ts=4 : - -# NOTE: Constructor in tuples.nim, #[] - -proc `=destroy`*( value: KuzuValueObj ) = - ## Graceful cleanup for out of scope values. - if value.valid: - when defined( debug ): echo &"Destroying value: {value}" - kuzu_value_destroy( addr value.handle ) - - -func getType( value: KuzuValue ) = - ## Find and set the native Kuzu type of this value. - var logical_type: kuzu_logical_type - kuzu_value_get_data_type( addr value.handle, addr logical_type ) - value.kind = kuzu_data_type_get_id( addr logical_type ) - kuzu_data_type_destroy( addr logical_type ) - - -template checkType( kind: kuzu_data_type_id, valid_types: set ) = - ## Raises a KuzuTypeError if the type conversion is incompatible. - if kind notin valid_types: - let msg = "Mismatched types: " & $kind & " != " & $valid_types - raise newException( KuzuTypeError, msg ) - - -func `$`*( value: KuzuValue ): string = - ## Stringify a value. - result = $kuzu_value_to_string( addr value.handle ) - - -func toBool*( value: KuzuValue ): bool = - ## Conversion from Kuzu type to Nim. - checkType( value.kind, {KUZU_BOOL} ) - assert( kuzu_value_get_bool( addr value.handle, addr result ) == KuzuSuccess ) - - -func toInt8*( value: KuzuValue ): int8 = - ## Conversion from Kuzu type to Nim. - checkType( value.kind, {KUZU_INT8} ) - assert( kuzu_value_get_int8( addr value.handle, addr result ) == KuzuSuccess ) - - -func toInt16*( value: KuzuValue ): int16 = - ## Conversion from Kuzu type to Nim. - checkType( value.kind, {KUZU_INT16} ) - assert( kuzu_value_get_int16( addr value.handle, addr result ) == KuzuSuccess ) - - -func toInt32*( value: KuzuValue ): int32 = - ## Conversion from Kuzu type to Nim. - checkType( value.kind, {KUZU_INT32} ) - assert( kuzu_value_get_int32( addr value.handle, addr result ) == KuzuSuccess ) - - -func toInt64*( value: KuzuValue ): int64 = - ## Conversion from Kuzu type to Nim. - checkType( value.kind, {KUZU_INT64} ) - assert( kuzu_value_get_int64( addr value.handle, addr result ) == KuzuSuccess ) - - -func toUint8*( value: KuzuValue ): uint8 = - ## Conversion from Kuzu type to Nim. - checkType( value.kind, {KUZU_UINT8} ) - assert( kuzu_value_get_uint8( addr value.handle, addr result ) == KuzuSuccess ) - - -func toUint16*( value: KuzuValue ): uint16 = - ## Conversion from Kuzu type to Nim. - checkType( value.kind, {KUZU_UINT16} ) - assert( kuzu_value_get_uint16( addr value.handle, addr result ) == KuzuSuccess ) - - -func toUint32*( value: KuzuValue ): uint32 = - ## Conversion from Kuzu type to Nim. - checkType( value.kind, {KUZU_UINT32} ) - assert( kuzu_value_get_uint32( addr value.handle, addr result ) == KuzuSuccess ) - - -func toUint64*( value: KuzuValue ): uint64 = - ## Conversion from Kuzu type to Nim. - checkType( value.kind, {KUZU_UINT64} ) - assert( kuzu_value_get_uint64( addr value.handle, addr result ) == KuzuSuccess ) - - -func toDouble*( value: KuzuValue ): float = - ## Conversion from Kuzu type to Nim. - checkType( value.kind, {KUZU_DOUBLE} ) - assert( kuzu_value_get_double( addr value.handle, addr result ) == KuzuSuccess ) - - -func toFloat*( value: KuzuValue ): float = - ## Conversion from Kuzu type to Nim. - checkType( value.kind, {KUZU_FLOAT} ) - var rv: cfloat - assert( kuzu_value_get_float( addr value.handle, addr rv ) == KuzuSuccess ) - result = rv - - -func toTimestamp*( value: KuzuValue ): int = - ## Conversion from Kuzu type to Nim. - checkType( value.kind, {KUZU_TIMESTAMP} ) - var rv: kuzu_timestamp_t - assert( kuzu_value_get_timestamp( addr value.handle, addr rv ) == KuzuSuccess ) - result = rv.value - - -func toList*( value: KuzuValue ): seq[ KuzuValue ] = - ## Return a sequence from KUZU_LIST values. - checkType( value.kind, {KUZU_LIST} ) - result = @[] - var size: uint64 - assert( kuzu_value_get_list_size( addr value.handle, addr size ) == KuzuSuccess ) - if size == 0: return - - for i in ( 0 .. size-1 ): - var kval = new KuzuValue - assert( - kuzu_value_get_list_element( - addr value.handle, i.uint64, addr kval.handle - ) == KuzuSuccess ) - kval.getType() - result.add( kval ) - -const toSeq* = toList - - -func toBlob*( value: KuzuValue ): seq[ byte ] = - ## Conversion from Kuzu type to Nim - returns a BLOB as a sequence of bytes. - checkType( value.kind, {KUZU_BLOB} ) - - result = @[] - var data: ptr byte - assert( kuzu_value_get_blob( addr value.handle, addr data ) == KuzuSuccess ) - - for idx in 0 .. BLOB_MAXSIZE: - var byte = cast[ptr byte](cast[uint](data) + idx.uint)[] - if byte == 0: break - result.add( byte ) - - kuzu_destroy_blob( data ) - - -func toStruct*( value: KuzuValue ): KuzuStructValue = - ## Create a convenience class for struct-like KuzuValues. - checkType( value.kind, { - KUZU_STRUCT, - KUZU_NODE, - KUZU_REL, - KUZU_RECURSIVE_REL, - KUZU_UNION - }) - result = new KuzuStructValue - result.value = value - - discard kuzu_value_get_struct_num_fields( addr value.handle, addr result.len ) - if result.len == 0: return - - # Build keys - for idx in ( 0 .. result.len - 1 ): - var keyname: cstring - assert( - kuzu_value_get_struct_field_name( - addr value.handle, idx.uint64, addr keyname - ) == KuzuSuccess ) - result.keys.add( $keyname ) - -const toNode* = toStruct -const toRel* = toStruct - - -func `[]`*( struct: KuzuStructValue, key: string ): KuzuValue = - ## Return a KuzuValue for the struct *key*. - var idx: uint64 - var found = false - for i in ( 0 .. struct.len-1 ): - if struct.keys[i] == key: - found = true - idx = i - break - if not found: - raise newException( KuzuIndexError, - &"""No such struct key "{key}".""" ) - - result = new KuzuValue - assert( - kuzu_value_get_struct_field_value( - addr struct.value.handle, idx.uint64, addr result.handle - ) == KuzuSuccess ) - result.getType() - - -func `$`*( struct: KuzuStructValue ): string = - ## Stringify a struct value. - result = $kuzu_value_to_string( addr struct.value.handle ) - - diff --git a/src/ladybug.nim b/src/ladybug.nim new file mode 100644 index 0000000..a2126fa --- /dev/null +++ b/src/ladybug.nim @@ -0,0 +1,6 @@ +# vim: set et sta sw=4 ts=4 : +# +# Friendly alias to lbug. + +include "lbug.nim" + diff --git a/src/lbug.nim b/src/lbug.nim new file mode 100644 index 0000000..d96970e --- /dev/null +++ b/src/lbug.nim @@ -0,0 +1,49 @@ +# vim: set et sta sw=4 ts=4 : +# + +{.passL:"-llbug".} + +when defined( futharkWrap ): + import futhark, os + + importc: + outputPath currentSourcePath.parentDir / "lbug" / "0.12.0.nim" + "lbug.h" +else: + include "lbug/0.12.0.nim" + +import + std/files, + std/paths, + std/strformat, + std/strutils + +# Order very much matters here pre Nim 3.0 multi-pass compiling. +include + "lbug/constants.nim", + "lbug/types.nim", + "lbug/config.nim", + "lbug/database.nim", + "lbug/connection.nim", + "lbug/value.nim", + "lbug/tuple.nim", + "lbug/queries.nim" + + +proc lbugVersionCompatible*(): bool = + ## Returns true if the system installed LadybugDB library + ## is the expected version of this library wrapper. + result = LBUG_EXPECTED_LIBVERSION == $lbugGetVersion() + + +when isMainModule: + echo "Nim-Ladybug version: ", LBUG_VERSION, + ". Expected library version: ", LBUG_EXPECTED_LIBVERSION, "." + echo "Installed lbug library version ", lbugGetVersion(), + " (storage version ", lbugGetStorageVersion(), ")" + if lbugVersionCompatible(): + echo "Versions match!" + else: + echo "This library wraps a different version of LadybugDB than what is installed." + echo "Behavior may be unexpected!" + diff --git a/src/lbug/0.12.0.nim b/src/lbug/0.12.0.nim new file mode 100644 index 0000000..8813aad --- /dev/null +++ b/src/lbug/0.12.0.nim @@ -0,0 +1,2168 @@ + +{.warning[UnusedImport]: off.} +{.hint[XDeclaredButNotUsed]: off.} +from macros import hint, warning, newLit, getSize + +from os import parentDir + +when not declared(ownSizeOf): + macro ownSizeof(x: typed): untyped = + newLit(x.getSize) + +type + enum_lbug_data_type_id_570425857* {.size: sizeof(cuint).} = enum + LBUG_ANY = 0, LBUG_NODE = 10, LBUG_REL = 11, LBUG_RECURSIVE_REL = 12, + LBUG_SERIAL = 13, LBUG_BOOL = 22, LBUG_INT64 = 23, LBUG_INT32 = 24, + LBUG_INT16 = 25, LBUG_INT8 = 26, LBUG_UINT64 = 27, LBUG_UINT32 = 28, + LBUG_UINT16 = 29, LBUG_UINT8 = 30, LBUG_INT128 = 31, LBUG_DOUBLE = 32, + LBUG_FLOAT = 33, LBUG_DATE = 34, LBUG_TIMESTAMP = 35, + LBUG_TIMESTAMP_SEC = 36, LBUG_TIMESTAMP_MS = 37, LBUG_TIMESTAMP_NS = 38, + LBUG_TIMESTAMP_TZ = 39, LBUG_INTERVAL = 40, LBUG_DECIMAL = 41, + LBUG_INTERNAL_ID = 42, LBUG_STRING = 50, LBUG_BLOB = 51, LBUG_LIST = 52, + LBUG_ARRAY = 53, LBUG_STRUCT = 54, LBUG_MAP = 55, LBUG_UNION = 56, + LBUG_POINTER = 58, LBUG_UUID = 59 +type + enum_lbug_state_570425861* {.size: sizeof(cuint).} = enum + LbugSuccess = 0, LbugError = 1 +when not declared(LBUG_HELPER_DLL_IMPORT): + type + LBUG_HELPER_DLL_IMPORT* = object +else: + static : + hint("Declaration of " & "LBUG_HELPER_DLL_IMPORT" & + " already exists, not redeclaring") +when not declared(LBUG_HELPER_DEPRECATED): + type + LBUG_HELPER_DEPRECATED* = object +else: + static : + hint("Declaration of " & "LBUG_HELPER_DEPRECATED" & + " already exists, not redeclaring") +type + struct_ArrowSchema_570425781 {.pure, inheritable, bycopy.} = object + format*: cstring ## Generated based on /usr/local/include/lbug.h:64:8 + name*: cstring + metadata*: cstring + flags*: int64 + n_children*: int64 + children*: ptr ptr struct_ArrowSchema_570425782 + dictionary*: ptr struct_ArrowSchema_570425782 + release*: proc (a0: ptr struct_ArrowSchema_570425782): void {.cdecl.} + private_data*: pointer + struct_ArrowArray_570425783 {.pure, inheritable, bycopy.} = object + length*: int64 ## Generated based on /usr/local/include/lbug.h:80:8 + null_count*: int64 + offset*: int64 + n_buffers*: int64 + n_children*: int64 + buffers*: ptr pointer + children*: ptr ptr struct_ArrowArray_570425784 + dictionary*: ptr struct_ArrowArray_570425784 + release*: proc (a0: ptr struct_ArrowArray_570425784): void {.cdecl.} + private_data*: pointer + struct_lbug_system_config_570425785 {.pure, inheritable, bycopy.} = object + buffer_pool_size*: uint64 ## Generated based on /usr/local/include/lbug.h:112:9 + max_num_threads*: uint64 + enable_compression*: bool + read_only*: bool + max_db_size*: uint64 + auto_checkpoint*: bool + checkpoint_threshold*: uint64 + lbug_system_config_570425787 = struct_lbug_system_config_570425786 ## Generated based on /usr/local/include/lbug.h:141:3 + struct_lbug_database_570425789 {.pure, inheritable, bycopy.} = object + internal_database*: pointer ## Generated based on /usr/local/include/lbug.h:146:9 + lbug_database_570425791 = struct_lbug_database_570425790 ## Generated based on /usr/local/include/lbug.h:148:3 + struct_lbug_connection_570425793 {.pure, inheritable, bycopy.} = object + internal_connection*: pointer ## Generated based on /usr/local/include/lbug.h:155:9 + lbug_connection_570425795 = struct_lbug_connection_570425794 ## Generated based on /usr/local/include/lbug.h:157:3 + struct_lbug_prepared_statement_570425797 {.pure, inheritable, bycopy.} = object + internal_prepared_statement*: pointer ## Generated based on /usr/local/include/lbug.h:163:9 + internal_bound_values*: pointer + lbug_prepared_statement_570425799 = struct_lbug_prepared_statement_570425798 ## Generated based on /usr/local/include/lbug.h:166:3 + struct_lbug_query_result_570425801 {.pure, inheritable, bycopy.} = object + internal_query_result*: pointer ## Generated based on /usr/local/include/lbug.h:171:9 + internal_is_owned_by_cpp*: bool + lbug_query_result_570425803 = struct_lbug_query_result_570425802 ## Generated based on /usr/local/include/lbug.h:174:3 + struct_lbug_flat_tuple_570425805 {.pure, inheritable, bycopy.} = object + internal_flat_tuple*: pointer ## Generated based on /usr/local/include/lbug.h:179:9 + internal_is_owned_by_cpp*: bool + lbug_flat_tuple_570425807 = struct_lbug_flat_tuple_570425806 ## Generated based on /usr/local/include/lbug.h:182:3 + struct_lbug_logical_type_570425809 {.pure, inheritable, bycopy.} = object + internal_data_type*: pointer ## Generated based on /usr/local/include/lbug.h:187:9 + lbug_logical_type_570425811 = struct_lbug_logical_type_570425810 ## Generated based on /usr/local/include/lbug.h:189:3 + struct_lbug_value_570425813 {.pure, inheritable, bycopy.} = object + internal_value*: pointer ## Generated based on /usr/local/include/lbug.h:194:9 + internal_is_owned_by_cpp*: bool + lbug_value_570425815 = struct_lbug_value_570425814 ## Generated based on /usr/local/include/lbug.h:197:3 + struct_lbug_internal_id_t_570425817 {.pure, inheritable, bycopy.} = object + table_id*: uint64 ## Generated based on /usr/local/include/lbug.h:202:9 + offset*: uint64 + lbug_internal_id_t_570425819 = struct_lbug_internal_id_t_570425818 ## Generated based on /usr/local/include/lbug.h:205:3 + struct_lbug_date_t_570425821 {.pure, inheritable, bycopy.} = object + days*: int32 ## Generated based on /usr/local/include/lbug.h:210:9 + lbug_date_t_570425823 = struct_lbug_date_t_570425822 ## Generated based on /usr/local/include/lbug.h:213:3 + struct_lbug_timestamp_ns_t_570425825 {.pure, inheritable, bycopy.} = object + value*: int64 ## Generated based on /usr/local/include/lbug.h:219:9 + lbug_timestamp_ns_t_570425827 = struct_lbug_timestamp_ns_t_570425826 ## Generated based on /usr/local/include/lbug.h:222:3 + struct_lbug_timestamp_ms_t_570425829 {.pure, inheritable, bycopy.} = object + value*: int64 ## Generated based on /usr/local/include/lbug.h:228:9 + lbug_timestamp_ms_t_570425831 = struct_lbug_timestamp_ms_t_570425830 ## Generated based on /usr/local/include/lbug.h:231:3 + struct_lbug_timestamp_sec_t_570425833 {.pure, inheritable, bycopy.} = object + value*: int64 ## Generated based on /usr/local/include/lbug.h:237:9 + lbug_timestamp_sec_t_570425835 = struct_lbug_timestamp_sec_t_570425834 ## Generated based on /usr/local/include/lbug.h:240:3 + struct_lbug_timestamp_tz_t_570425837 {.pure, inheritable, bycopy.} = object + value*: int64 ## Generated based on /usr/local/include/lbug.h:246:9 + lbug_timestamp_tz_t_570425839 = struct_lbug_timestamp_tz_t_570425838 ## Generated based on /usr/local/include/lbug.h:249:3 + struct_lbug_timestamp_t_570425841 {.pure, inheritable, bycopy.} = object + value*: int64 ## Generated based on /usr/local/include/lbug.h:255:9 + lbug_timestamp_t_570425843 = struct_lbug_timestamp_t_570425842 ## Generated based on /usr/local/include/lbug.h:258:3 + struct_lbug_interval_t_570425845 {.pure, inheritable, bycopy.} = object + months*: int32 ## Generated based on /usr/local/include/lbug.h:263:9 + days*: int32 + micros*: int64 + lbug_interval_t_570425847 = struct_lbug_interval_t_570425846 ## Generated based on /usr/local/include/lbug.h:267:3 + struct_lbug_query_summary_570425849 {.pure, inheritable, bycopy.} = object + internal_query_summary*: pointer ## Generated based on /usr/local/include/lbug.h:273:9 + lbug_query_summary_570425851 = struct_lbug_query_summary_570425850 ## Generated based on /usr/local/include/lbug.h:275:3 + struct_lbug_int128_t_570425853 {.pure, inheritable, bycopy.} = object + low*: uint64 ## Generated based on /usr/local/include/lbug.h:277:9 + high*: int64 + lbug_int128_t_570425855 = struct_lbug_int128_t_570425854 ## Generated based on /usr/local/include/lbug.h:280:3 + lbug_data_type_id_570425859 = enum_lbug_data_type_id_570425858 ## Generated based on /usr/local/include/lbug.h:325:3 + lbug_state_570425863 = enum_lbug_state_570425862 ## Generated based on /usr/local/include/lbug.h:330:49 + struct_tm_570425865 {.pure, inheritable, bycopy.} = object + tm_sec*: cint ## Generated based on /usr/include/bits/types/struct_tm.h:7:8 + tm_min*: cint + tm_hour*: cint + tm_mday*: cint + tm_mon*: cint + tm_year*: cint + tm_wday*: cint + tm_yday*: cint + tm_isdst*: cint + tm_gmtoff*: clong + tm_zone*: cstring + lbug_database_570425792 = (when declared(lbug_database): + when ownSizeof(lbug_database) != ownSizeof(lbug_database_570425791): + static : + warning("Declaration of " & "lbug_database" & + " exists but with different size") + lbug_database + else: + lbug_database_570425791) + lbug_timestamp_t_570425844 = (when declared(lbug_timestamp_t): + when ownSizeof(lbug_timestamp_t) != ownSizeof(lbug_timestamp_t_570425843): + static : + warning("Declaration of " & "lbug_timestamp_t" & + " exists but with different size") + lbug_timestamp_t + else: + lbug_timestamp_t_570425843) + struct_lbug_flat_tuple_570425806 = (when declared(struct_lbug_flat_tuple): + when ownSizeof(struct_lbug_flat_tuple) != ownSizeof(struct_lbug_flat_tuple_570425805): + static : + warning("Declaration of " & "struct_lbug_flat_tuple" & + " exists but with different size") + struct_lbug_flat_tuple + else: + struct_lbug_flat_tuple_570425805) + lbug_value_570425816 = (when declared(lbug_value): + when ownSizeof(lbug_value) != ownSizeof(lbug_value_570425815): + static : + warning("Declaration of " & "lbug_value" & + " exists but with different size") + lbug_value + else: + lbug_value_570425815) + lbug_query_summary_570425852 = (when declared(lbug_query_summary): + when ownSizeof(lbug_query_summary) != ownSizeof(lbug_query_summary_570425851): + static : + warning("Declaration of " & "lbug_query_summary" & + " exists but with different size") + lbug_query_summary + else: + lbug_query_summary_570425851) + enum_lbug_state_570425862 = (when declared(enum_lbug_state): + when ownSizeof(enum_lbug_state) != ownSizeof(enum_lbug_state_570425861): + static : + warning("Declaration of " & "enum_lbug_state" & + " exists but with different size") + enum_lbug_state + else: + enum_lbug_state_570425861) + lbug_timestamp_sec_t_570425836 = (when declared(lbug_timestamp_sec_t): + when ownSizeof(lbug_timestamp_sec_t) != ownSizeof(lbug_timestamp_sec_t_570425835): + static : + warning("Declaration of " & "lbug_timestamp_sec_t" & + " exists but with different size") + lbug_timestamp_sec_t + else: + lbug_timestamp_sec_t_570425835) + struct_lbug_system_config_570425786 = (when declared(struct_lbug_system_config): + when ownSizeof(struct_lbug_system_config) != + ownSizeof(struct_lbug_system_config_570425785): + static : + warning("Declaration of " & "struct_lbug_system_config" & + " exists but with different size") + struct_lbug_system_config + else: + struct_lbug_system_config_570425785) + lbug_state_570425864 = (when declared(lbug_state): + when ownSizeof(lbug_state) != ownSizeof(lbug_state_570425863): + static : + warning("Declaration of " & "lbug_state" & + " exists but with different size") + lbug_state + else: + lbug_state_570425863) + lbug_system_config_570425788 = (when declared(lbug_system_config): + when ownSizeof(lbug_system_config) != ownSizeof(lbug_system_config_570425787): + static : + warning("Declaration of " & "lbug_system_config" & + " exists but with different size") + lbug_system_config + else: + lbug_system_config_570425787) + struct_lbug_connection_570425794 = (when declared(struct_lbug_connection): + when ownSizeof(struct_lbug_connection) != ownSizeof(struct_lbug_connection_570425793): + static : + warning("Declaration of " & "struct_lbug_connection" & + " exists but with different size") + struct_lbug_connection + else: + struct_lbug_connection_570425793) + lbug_timestamp_ns_t_570425828 = (when declared(lbug_timestamp_ns_t): + when ownSizeof(lbug_timestamp_ns_t) != ownSizeof(lbug_timestamp_ns_t_570425827): + static : + warning("Declaration of " & "lbug_timestamp_ns_t" & + " exists but with different size") + lbug_timestamp_ns_t + else: + lbug_timestamp_ns_t_570425827) + lbug_query_result_570425804 = (when declared(lbug_query_result): + when ownSizeof(lbug_query_result) != ownSizeof(lbug_query_result_570425803): + static : + warning("Declaration of " & "lbug_query_result" & + " exists but with different size") + lbug_query_result + else: + lbug_query_result_570425803) + struct_lbug_internal_id_t_570425818 = (when declared(struct_lbug_internal_id_t): + when ownSizeof(struct_lbug_internal_id_t) != + ownSizeof(struct_lbug_internal_id_t_570425817): + static : + warning("Declaration of " & "struct_lbug_internal_id_t" & + " exists but with different size") + struct_lbug_internal_id_t + else: + struct_lbug_internal_id_t_570425817) + lbug_internal_id_t_570425820 = (when declared(lbug_internal_id_t): + when ownSizeof(lbug_internal_id_t) != ownSizeof(lbug_internal_id_t_570425819): + static : + warning("Declaration of " & "lbug_internal_id_t" & + " exists but with different size") + lbug_internal_id_t + else: + lbug_internal_id_t_570425819) + struct_lbug_logical_type_570425810 = (when declared(struct_lbug_logical_type): + when ownSizeof(struct_lbug_logical_type) != + ownSizeof(struct_lbug_logical_type_570425809): + static : + warning("Declaration of " & "struct_lbug_logical_type" & + " exists but with different size") + struct_lbug_logical_type + else: + struct_lbug_logical_type_570425809) + struct_lbug_timestamp_sec_t_570425834 = (when declared( + struct_lbug_timestamp_sec_t): + when ownSizeof(struct_lbug_timestamp_sec_t) != + ownSizeof(struct_lbug_timestamp_sec_t_570425833): + static : + warning("Declaration of " & "struct_lbug_timestamp_sec_t" & + " exists but with different size") + struct_lbug_timestamp_sec_t + else: + struct_lbug_timestamp_sec_t_570425833) + struct_ArrowSchema_570425782 = (when declared(struct_ArrowSchema): + when ownSizeof(struct_ArrowSchema) != ownSizeof(struct_ArrowSchema_570425781): + static : + warning("Declaration of " & "struct_ArrowSchema" & + " exists but with different size") + struct_ArrowSchema + else: + struct_ArrowSchema_570425781) + struct_lbug_query_result_570425802 = (when declared(struct_lbug_query_result): + when ownSizeof(struct_lbug_query_result) != + ownSizeof(struct_lbug_query_result_570425801): + static : + warning("Declaration of " & "struct_lbug_query_result" & + " exists but with different size") + struct_lbug_query_result + else: + struct_lbug_query_result_570425801) + struct_lbug_timestamp_ns_t_570425826 = (when declared( + struct_lbug_timestamp_ns_t): + when ownSizeof(struct_lbug_timestamp_ns_t) != + ownSizeof(struct_lbug_timestamp_ns_t_570425825): + static : + warning("Declaration of " & "struct_lbug_timestamp_ns_t" & + " exists but with different size") + struct_lbug_timestamp_ns_t + else: + struct_lbug_timestamp_ns_t_570425825) + lbug_timestamp_tz_t_570425840 = (when declared(lbug_timestamp_tz_t): + when ownSizeof(lbug_timestamp_tz_t) != ownSizeof(lbug_timestamp_tz_t_570425839): + static : + warning("Declaration of " & "lbug_timestamp_tz_t" & + " exists but with different size") + lbug_timestamp_tz_t + else: + lbug_timestamp_tz_t_570425839) + struct_lbug_timestamp_t_570425842 = (when declared(struct_lbug_timestamp_t): + when ownSizeof(struct_lbug_timestamp_t) != + ownSizeof(struct_lbug_timestamp_t_570425841): + static : + warning("Declaration of " & "struct_lbug_timestamp_t" & + " exists but with different size") + struct_lbug_timestamp_t + else: + struct_lbug_timestamp_t_570425841) + lbug_prepared_statement_570425800 = (when declared(lbug_prepared_statement): + when ownSizeof(lbug_prepared_statement) != + ownSizeof(lbug_prepared_statement_570425799): + static : + warning("Declaration of " & "lbug_prepared_statement" & + " exists but with different size") + lbug_prepared_statement + else: + lbug_prepared_statement_570425799) + struct_lbug_query_summary_570425850 = (when declared(struct_lbug_query_summary): + when ownSizeof(struct_lbug_query_summary) != + ownSizeof(struct_lbug_query_summary_570425849): + static : + warning("Declaration of " & "struct_lbug_query_summary" & + " exists but with different size") + struct_lbug_query_summary + else: + struct_lbug_query_summary_570425849) + struct_lbug_database_570425790 = (when declared(struct_lbug_database): + when ownSizeof(struct_lbug_database) != ownSizeof(struct_lbug_database_570425789): + static : + warning("Declaration of " & "struct_lbug_database" & + " exists but with different size") + struct_lbug_database + else: + struct_lbug_database_570425789) + struct_lbug_prepared_statement_570425798 = (when declared( + struct_lbug_prepared_statement): + when ownSizeof(struct_lbug_prepared_statement) != + ownSizeof(struct_lbug_prepared_statement_570425797): + static : + warning("Declaration of " & "struct_lbug_prepared_statement" & + " exists but with different size") + struct_lbug_prepared_statement + else: + struct_lbug_prepared_statement_570425797) + lbug_logical_type_570425812 = (when declared(lbug_logical_type): + when ownSizeof(lbug_logical_type) != ownSizeof(lbug_logical_type_570425811): + static : + warning("Declaration of " & "lbug_logical_type" & + " exists but with different size") + lbug_logical_type + else: + lbug_logical_type_570425811) + lbug_date_t_570425824 = (when declared(lbug_date_t): + when ownSizeof(lbug_date_t) != ownSizeof(lbug_date_t_570425823): + static : + warning("Declaration of " & "lbug_date_t" & + " exists but with different size") + lbug_date_t + else: + lbug_date_t_570425823) + struct_lbug_timestamp_ms_t_570425830 = (when declared( + struct_lbug_timestamp_ms_t): + when ownSizeof(struct_lbug_timestamp_ms_t) != + ownSizeof(struct_lbug_timestamp_ms_t_570425829): + static : + warning("Declaration of " & "struct_lbug_timestamp_ms_t" & + " exists but with different size") + struct_lbug_timestamp_ms_t + else: + struct_lbug_timestamp_ms_t_570425829) + lbug_connection_570425796 = (when declared(lbug_connection): + when ownSizeof(lbug_connection) != ownSizeof(lbug_connection_570425795): + static : + warning("Declaration of " & "lbug_connection" & + " exists but with different size") + lbug_connection + else: + lbug_connection_570425795) + struct_lbug_value_570425814 = (when declared(struct_lbug_value): + when ownSizeof(struct_lbug_value) != ownSizeof(struct_lbug_value_570425813): + static : + warning("Declaration of " & "struct_lbug_value" & + " exists but with different size") + struct_lbug_value + else: + struct_lbug_value_570425813) + struct_lbug_interval_t_570425846 = (when declared(struct_lbug_interval_t): + when ownSizeof(struct_lbug_interval_t) != ownSizeof(struct_lbug_interval_t_570425845): + static : + warning("Declaration of " & "struct_lbug_interval_t" & + " exists but with different size") + struct_lbug_interval_t + else: + struct_lbug_interval_t_570425845) + struct_ArrowArray_570425784 = (when declared(struct_ArrowArray): + when ownSizeof(struct_ArrowArray) != ownSizeof(struct_ArrowArray_570425783): + static : + warning("Declaration of " & "struct_ArrowArray" & + " exists but with different size") + struct_ArrowArray + else: + struct_ArrowArray_570425783) + lbug_flat_tuple_570425808 = (when declared(lbug_flat_tuple): + when ownSizeof(lbug_flat_tuple) != ownSizeof(lbug_flat_tuple_570425807): + static : + warning("Declaration of " & "lbug_flat_tuple" & + " exists but with different size") + lbug_flat_tuple + else: + lbug_flat_tuple_570425807) + lbug_timestamp_ms_t_570425832 = (when declared(lbug_timestamp_ms_t): + when ownSizeof(lbug_timestamp_ms_t) != ownSizeof(lbug_timestamp_ms_t_570425831): + static : + warning("Declaration of " & "lbug_timestamp_ms_t" & + " exists but with different size") + lbug_timestamp_ms_t + else: + lbug_timestamp_ms_t_570425831) + lbug_interval_t_570425848 = (when declared(lbug_interval_t): + when ownSizeof(lbug_interval_t) != ownSizeof(lbug_interval_t_570425847): + static : + warning("Declaration of " & "lbug_interval_t" & + " exists but with different size") + lbug_interval_t + else: + lbug_interval_t_570425847) + struct_lbug_int128_t_570425854 = (when declared(struct_lbug_int128_t): + when ownSizeof(struct_lbug_int128_t) != ownSizeof(struct_lbug_int128_t_570425853): + static : + warning("Declaration of " & "struct_lbug_int128_t" & + " exists but with different size") + struct_lbug_int128_t + else: + struct_lbug_int128_t_570425853) + lbug_data_type_id_570425860 = (when declared(lbug_data_type_id): + when ownSizeof(lbug_data_type_id) != ownSizeof(lbug_data_type_id_570425859): + static : + warning("Declaration of " & "lbug_data_type_id" & + " exists but with different size") + lbug_data_type_id + else: + lbug_data_type_id_570425859) + struct_tm_570425866 = (when declared(struct_tm): + when ownSizeof(struct_tm) != ownSizeof(struct_tm_570425865): + static : + warning("Declaration of " & "struct_tm" & + " exists but with different size") + struct_tm + else: + struct_tm_570425865) + lbug_int128_t_570425856 = (when declared(lbug_int128_t): + when ownSizeof(lbug_int128_t) != ownSizeof(lbug_int128_t_570425855): + static : + warning("Declaration of " & "lbug_int128_t" & + " exists but with different size") + lbug_int128_t + else: + lbug_int128_t_570425855) + enum_lbug_data_type_id_570425858 = (when declared(enum_lbug_data_type_id): + when ownSizeof(enum_lbug_data_type_id) != ownSizeof(enum_lbug_data_type_id_570425857): + static : + warning("Declaration of " & "enum_lbug_data_type_id" & + " exists but with different size") + enum_lbug_data_type_id + else: + enum_lbug_data_type_id_570425857) + struct_lbug_date_t_570425822 = (when declared(struct_lbug_date_t): + when ownSizeof(struct_lbug_date_t) != ownSizeof(struct_lbug_date_t_570425821): + static : + warning("Declaration of " & "struct_lbug_date_t" & + " exists but with different size") + struct_lbug_date_t + else: + struct_lbug_date_t_570425821) + struct_lbug_timestamp_tz_t_570425838 = (when declared( + struct_lbug_timestamp_tz_t): + when ownSizeof(struct_lbug_timestamp_tz_t) != + ownSizeof(struct_lbug_timestamp_tz_t_570425837): + static : + warning("Declaration of " & "struct_lbug_timestamp_tz_t" & + " exists but with different size") + struct_lbug_timestamp_tz_t + else: + struct_lbug_timestamp_tz_t_570425837) +when not declared(lbug_database): + type + lbug_database* = lbug_database_570425791 +else: + static : + hint("Declaration of " & "lbug_database" & + " already exists, not redeclaring") +when not declared(lbug_timestamp_t): + type + lbug_timestamp_t* = lbug_timestamp_t_570425843 +else: + static : + hint("Declaration of " & "lbug_timestamp_t" & + " already exists, not redeclaring") +when not declared(struct_lbug_flat_tuple): + type + struct_lbug_flat_tuple* = struct_lbug_flat_tuple_570425805 +else: + static : + hint("Declaration of " & "struct_lbug_flat_tuple" & + " already exists, not redeclaring") +when not declared(lbug_value): + type + lbug_value* = lbug_value_570425815 +else: + static : + hint("Declaration of " & "lbug_value" & " already exists, not redeclaring") +when not declared(lbug_query_summary): + type + lbug_query_summary* = lbug_query_summary_570425851 +else: + static : + hint("Declaration of " & "lbug_query_summary" & + " already exists, not redeclaring") +when not declared(enum_lbug_state): + type + enum_lbug_state* = enum_lbug_state_570425861 +else: + static : + hint("Declaration of " & "enum_lbug_state" & + " already exists, not redeclaring") +when not declared(lbug_timestamp_sec_t): + type + lbug_timestamp_sec_t* = lbug_timestamp_sec_t_570425835 +else: + static : + hint("Declaration of " & "lbug_timestamp_sec_t" & + " already exists, not redeclaring") +when not declared(struct_lbug_system_config): + type + struct_lbug_system_config* = struct_lbug_system_config_570425785 +else: + static : + hint("Declaration of " & "struct_lbug_system_config" & + " already exists, not redeclaring") +when not declared(lbug_state): + type + lbug_state* = lbug_state_570425863 +else: + static : + hint("Declaration of " & "lbug_state" & " already exists, not redeclaring") +when not declared(lbug_system_config): + type + lbug_system_config* = lbug_system_config_570425787 +else: + static : + hint("Declaration of " & "lbug_system_config" & + " already exists, not redeclaring") +when not declared(struct_lbug_connection): + type + struct_lbug_connection* = struct_lbug_connection_570425793 +else: + static : + hint("Declaration of " & "struct_lbug_connection" & + " already exists, not redeclaring") +when not declared(lbug_timestamp_ns_t): + type + lbug_timestamp_ns_t* = lbug_timestamp_ns_t_570425827 +else: + static : + hint("Declaration of " & "lbug_timestamp_ns_t" & + " already exists, not redeclaring") +when not declared(lbug_query_result): + type + lbug_query_result* = lbug_query_result_570425803 +else: + static : + hint("Declaration of " & "lbug_query_result" & + " already exists, not redeclaring") +when not declared(struct_lbug_internal_id_t): + type + struct_lbug_internal_id_t* = struct_lbug_internal_id_t_570425817 +else: + static : + hint("Declaration of " & "struct_lbug_internal_id_t" & + " already exists, not redeclaring") +when not declared(lbug_internal_id_t): + type + lbug_internal_id_t* = lbug_internal_id_t_570425819 +else: + static : + hint("Declaration of " & "lbug_internal_id_t" & + " already exists, not redeclaring") +when not declared(struct_lbug_logical_type): + type + struct_lbug_logical_type* = struct_lbug_logical_type_570425809 +else: + static : + hint("Declaration of " & "struct_lbug_logical_type" & + " already exists, not redeclaring") +when not declared(struct_lbug_timestamp_sec_t): + type + struct_lbug_timestamp_sec_t* = struct_lbug_timestamp_sec_t_570425833 +else: + static : + hint("Declaration of " & "struct_lbug_timestamp_sec_t" & + " already exists, not redeclaring") +when not declared(struct_ArrowSchema): + type + struct_ArrowSchema* = struct_ArrowSchema_570425781 +else: + static : + hint("Declaration of " & "struct_ArrowSchema" & + " already exists, not redeclaring") +when not declared(struct_lbug_query_result): + type + struct_lbug_query_result* = struct_lbug_query_result_570425801 +else: + static : + hint("Declaration of " & "struct_lbug_query_result" & + " already exists, not redeclaring") +when not declared(struct_lbug_timestamp_ns_t): + type + struct_lbug_timestamp_ns_t* = struct_lbug_timestamp_ns_t_570425825 +else: + static : + hint("Declaration of " & "struct_lbug_timestamp_ns_t" & + " already exists, not redeclaring") +when not declared(lbug_timestamp_tz_t): + type + lbug_timestamp_tz_t* = lbug_timestamp_tz_t_570425839 +else: + static : + hint("Declaration of " & "lbug_timestamp_tz_t" & + " already exists, not redeclaring") +when not declared(struct_lbug_timestamp_t): + type + struct_lbug_timestamp_t* = struct_lbug_timestamp_t_570425841 +else: + static : + hint("Declaration of " & "struct_lbug_timestamp_t" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement): + type + lbug_prepared_statement* = lbug_prepared_statement_570425799 +else: + static : + hint("Declaration of " & "lbug_prepared_statement" & + " already exists, not redeclaring") +when not declared(struct_lbug_query_summary): + type + struct_lbug_query_summary* = struct_lbug_query_summary_570425849 +else: + static : + hint("Declaration of " & "struct_lbug_query_summary" & + " already exists, not redeclaring") +when not declared(struct_lbug_database): + type + struct_lbug_database* = struct_lbug_database_570425789 +else: + static : + hint("Declaration of " & "struct_lbug_database" & + " already exists, not redeclaring") +when not declared(struct_lbug_prepared_statement): + type + struct_lbug_prepared_statement* = struct_lbug_prepared_statement_570425797 +else: + static : + hint("Declaration of " & "struct_lbug_prepared_statement" & + " already exists, not redeclaring") +when not declared(lbug_logical_type): + type + lbug_logical_type* = lbug_logical_type_570425811 +else: + static : + hint("Declaration of " & "lbug_logical_type" & + " already exists, not redeclaring") +when not declared(lbug_date_t): + type + lbug_date_t* = lbug_date_t_570425823 +else: + static : + hint("Declaration of " & "lbug_date_t" & " already exists, not redeclaring") +when not declared(struct_lbug_timestamp_ms_t): + type + struct_lbug_timestamp_ms_t* = struct_lbug_timestamp_ms_t_570425829 +else: + static : + hint("Declaration of " & "struct_lbug_timestamp_ms_t" & + " already exists, not redeclaring") +when not declared(lbug_connection): + type + lbug_connection* = lbug_connection_570425795 +else: + static : + hint("Declaration of " & "lbug_connection" & + " already exists, not redeclaring") +when not declared(struct_lbug_value): + type + struct_lbug_value* = struct_lbug_value_570425813 +else: + static : + hint("Declaration of " & "struct_lbug_value" & + " already exists, not redeclaring") +when not declared(struct_lbug_interval_t): + type + struct_lbug_interval_t* = struct_lbug_interval_t_570425845 +else: + static : + hint("Declaration of " & "struct_lbug_interval_t" & + " already exists, not redeclaring") +when not declared(struct_ArrowArray): + type + struct_ArrowArray* = struct_ArrowArray_570425783 +else: + static : + hint("Declaration of " & "struct_ArrowArray" & + " already exists, not redeclaring") +when not declared(lbug_flat_tuple): + type + lbug_flat_tuple* = lbug_flat_tuple_570425807 +else: + static : + hint("Declaration of " & "lbug_flat_tuple" & + " already exists, not redeclaring") +when not declared(lbug_timestamp_ms_t): + type + lbug_timestamp_ms_t* = lbug_timestamp_ms_t_570425831 +else: + static : + hint("Declaration of " & "lbug_timestamp_ms_t" & + " already exists, not redeclaring") +when not declared(lbug_interval_t): + type + lbug_interval_t* = lbug_interval_t_570425847 +else: + static : + hint("Declaration of " & "lbug_interval_t" & + " already exists, not redeclaring") +when not declared(struct_lbug_int128_t): + type + struct_lbug_int128_t* = struct_lbug_int128_t_570425853 +else: + static : + hint("Declaration of " & "struct_lbug_int128_t" & + " already exists, not redeclaring") +when not declared(lbug_data_type_id): + type + lbug_data_type_id* = lbug_data_type_id_570425859 +else: + static : + hint("Declaration of " & "lbug_data_type_id" & + " already exists, not redeclaring") +when not declared(struct_tm): + type + struct_tm* = struct_tm_570425865 +else: + static : + hint("Declaration of " & "struct_tm" & " already exists, not redeclaring") +when not declared(lbug_int128_t): + type + lbug_int128_t* = lbug_int128_t_570425855 +else: + static : + hint("Declaration of " & "lbug_int128_t" & + " already exists, not redeclaring") +when not declared(enum_lbug_data_type_id): + type + enum_lbug_data_type_id* = enum_lbug_data_type_id_570425857 +else: + static : + hint("Declaration of " & "enum_lbug_data_type_id" & + " already exists, not redeclaring") +when not declared(struct_lbug_date_t): + type + struct_lbug_date_t* = struct_lbug_date_t_570425821 +else: + static : + hint("Declaration of " & "struct_lbug_date_t" & + " already exists, not redeclaring") +when not declared(struct_lbug_timestamp_tz_t): + type + struct_lbug_timestamp_tz_t* = struct_lbug_timestamp_tz_t_570425837 +else: + static : + hint("Declaration of " & "struct_lbug_timestamp_tz_t" & + " already exists, not redeclaring") +when not declared(LBUG_API): + when LBUG_HELPER_DLL_IMPORT is typedesc: + type + LBUG_API* = LBUG_HELPER_DLL_IMPORT ## Generated based on /usr/local/include/lbug.h:33:9 + else: + when LBUG_HELPER_DLL_IMPORT is static: + const + LBUG_API* = LBUG_HELPER_DLL_IMPORT ## Generated based on /usr/local/include/lbug.h:33:9 + else: + let LBUG_API* = LBUG_HELPER_DLL_IMPORT ## Generated based on /usr/local/include/lbug.h:33:9 +else: + static : + hint("Declaration of " & "LBUG_API" & " already exists, not redeclaring") +when not declared(LBUG_DEPRECATED): + when LBUG_HELPER_DEPRECATED is typedesc: + type + LBUG_DEPRECATED* = LBUG_HELPER_DEPRECATED ## Generated based on /usr/local/include/lbug.h:40:9 + else: + when LBUG_HELPER_DEPRECATED is static: + const + LBUG_DEPRECATED* = LBUG_HELPER_DEPRECATED ## Generated based on /usr/local/include/lbug.h:40:9 + else: + let LBUG_DEPRECATED* = LBUG_HELPER_DEPRECATED ## Generated based on /usr/local/include/lbug.h:40:9 +else: + static : + hint("Declaration of " & "LBUG_DEPRECATED" & + " already exists, not redeclaring") +when not declared(ARROW_FLAG_DICTIONARY_ORDERED): + when 1 is static: + const + ARROW_FLAG_DICTIONARY_ORDERED* = 1 ## Generated based on /usr/local/include/lbug.h:60:9 + else: + let ARROW_FLAG_DICTIONARY_ORDERED* = 1 ## Generated based on /usr/local/include/lbug.h:60:9 +else: + static : + hint("Declaration of " & "ARROW_FLAG_DICTIONARY_ORDERED" & + " already exists, not redeclaring") +when not declared(ARROW_FLAG_NULLABLE): + when 2 is static: + const + ARROW_FLAG_NULLABLE* = 2 ## Generated based on /usr/local/include/lbug.h:61:9 + else: + let ARROW_FLAG_NULLABLE* = 2 ## Generated based on /usr/local/include/lbug.h:61:9 +else: + static : + hint("Declaration of " & "ARROW_FLAG_NULLABLE" & + " already exists, not redeclaring") +when not declared(ARROW_FLAG_MAP_KEYS_SORTED): + when 4 is static: + const + ARROW_FLAG_MAP_KEYS_SORTED* = 4 ## Generated based on /usr/local/include/lbug.h:62:9 + else: + let ARROW_FLAG_MAP_KEYS_SORTED* = 4 ## Generated based on /usr/local/include/lbug.h:62:9 +else: + static : + hint("Declaration of " & "ARROW_FLAG_MAP_KEYS_SORTED" & + " already exists, not redeclaring") +when not declared(lbug_database_init): + proc lbug_database_init*(database_path: cstring; + system_config: lbug_system_config_570425788; + out_database: ptr lbug_database_570425792): lbug_state_570425864 {. + cdecl, importc: "lbug_database_init".} +else: + static : + hint("Declaration of " & "lbug_database_init" & + " already exists, not redeclaring") +when not declared(lbug_database_destroy): + proc lbug_database_destroy*(database: ptr lbug_database_570425792): void {. + cdecl, importc: "lbug_database_destroy".} +else: + static : + hint("Declaration of " & "lbug_database_destroy" & + " already exists, not redeclaring") +when not declared(lbug_default_system_config): + proc lbug_default_system_config*(): lbug_system_config_570425788 {.cdecl, + importc: "lbug_default_system_config".} +else: + static : + hint("Declaration of " & "lbug_default_system_config" & + " already exists, not redeclaring") +when not declared(lbug_connection_init): + proc lbug_connection_init*(database: ptr lbug_database_570425792; + out_connection: ptr lbug_connection_570425796): lbug_state_570425864 {. + cdecl, importc: "lbug_connection_init".} +else: + static : + hint("Declaration of " & "lbug_connection_init" & + " already exists, not redeclaring") +when not declared(lbug_connection_destroy): + proc lbug_connection_destroy*(connection: ptr lbug_connection_570425796): void {. + cdecl, importc: "lbug_connection_destroy".} +else: + static : + hint("Declaration of " & "lbug_connection_destroy" & + " already exists, not redeclaring") +when not declared(lbug_connection_set_max_num_thread_for_exec): + proc lbug_connection_set_max_num_thread_for_exec*( + connection: ptr lbug_connection_570425796; num_threads: uint64): lbug_state_570425864 {. + cdecl, importc: "lbug_connection_set_max_num_thread_for_exec".} +else: + static : + hint("Declaration of " & "lbug_connection_set_max_num_thread_for_exec" & + " already exists, not redeclaring") +when not declared(lbug_connection_get_max_num_thread_for_exec): + proc lbug_connection_get_max_num_thread_for_exec*( + connection: ptr lbug_connection_570425796; out_result: ptr uint64): lbug_state_570425864 {. + cdecl, importc: "lbug_connection_get_max_num_thread_for_exec".} +else: + static : + hint("Declaration of " & "lbug_connection_get_max_num_thread_for_exec" & + " already exists, not redeclaring") +when not declared(lbug_connection_query): + proc lbug_connection_query*(connection: ptr lbug_connection_570425796; + query: cstring; + out_query_result: ptr lbug_query_result_570425804): lbug_state_570425864 {. + cdecl, importc: "lbug_connection_query".} +else: + static : + hint("Declaration of " & "lbug_connection_query" & + " already exists, not redeclaring") +when not declared(lbug_connection_prepare): + proc lbug_connection_prepare*(connection: ptr lbug_connection_570425796; + query: cstring; out_prepared_statement: ptr lbug_prepared_statement_570425800): lbug_state_570425864 {. + cdecl, importc: "lbug_connection_prepare".} +else: + static : + hint("Declaration of " & "lbug_connection_prepare" & + " already exists, not redeclaring") +when not declared(lbug_connection_execute): + proc lbug_connection_execute*(connection: ptr lbug_connection_570425796; + prepared_statement: ptr lbug_prepared_statement_570425800; + out_query_result: ptr lbug_query_result_570425804): lbug_state_570425864 {. + cdecl, importc: "lbug_connection_execute".} +else: + static : + hint("Declaration of " & "lbug_connection_execute" & + " already exists, not redeclaring") +when not declared(lbug_connection_interrupt): + proc lbug_connection_interrupt*(connection: ptr lbug_connection_570425796): void {. + cdecl, importc: "lbug_connection_interrupt".} +else: + static : + hint("Declaration of " & "lbug_connection_interrupt" & + " already exists, not redeclaring") +when not declared(lbug_connection_set_query_timeout): + proc lbug_connection_set_query_timeout*(connection: ptr lbug_connection_570425796; + timeout_in_ms: uint64): lbug_state_570425864 {.cdecl, + importc: "lbug_connection_set_query_timeout".} +else: + static : + hint("Declaration of " & "lbug_connection_set_query_timeout" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_destroy): + proc lbug_prepared_statement_destroy*(prepared_statement: ptr lbug_prepared_statement_570425800): void {. + cdecl, importc: "lbug_prepared_statement_destroy".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_destroy" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_is_success): + proc lbug_prepared_statement_is_success*( + prepared_statement: ptr lbug_prepared_statement_570425800): bool {.cdecl, + importc: "lbug_prepared_statement_is_success".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_is_success" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_get_error_message): + proc lbug_prepared_statement_get_error_message*( + prepared_statement: ptr lbug_prepared_statement_570425800): cstring {. + cdecl, importc: "lbug_prepared_statement_get_error_message".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_get_error_message" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_bind_bool): + proc lbug_prepared_statement_bind_bool*( + prepared_statement: ptr lbug_prepared_statement_570425800; + param_name: cstring; value: bool): lbug_state_570425864 {.cdecl, + importc: "lbug_prepared_statement_bind_bool".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_bind_bool" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_bind_int64): + proc lbug_prepared_statement_bind_int64*( + prepared_statement: ptr lbug_prepared_statement_570425800; + param_name: cstring; value: int64): lbug_state_570425864 {.cdecl, + importc: "lbug_prepared_statement_bind_int64".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_bind_int64" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_bind_int32): + proc lbug_prepared_statement_bind_int32*( + prepared_statement: ptr lbug_prepared_statement_570425800; + param_name: cstring; value: int32): lbug_state_570425864 {.cdecl, + importc: "lbug_prepared_statement_bind_int32".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_bind_int32" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_bind_int16): + proc lbug_prepared_statement_bind_int16*( + prepared_statement: ptr lbug_prepared_statement_570425800; + param_name: cstring; value: int16): lbug_state_570425864 {.cdecl, + importc: "lbug_prepared_statement_bind_int16".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_bind_int16" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_bind_int8): + proc lbug_prepared_statement_bind_int8*( + prepared_statement: ptr lbug_prepared_statement_570425800; + param_name: cstring; value: int8): lbug_state_570425864 {.cdecl, + importc: "lbug_prepared_statement_bind_int8".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_bind_int8" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_bind_uint64): + proc lbug_prepared_statement_bind_uint64*( + prepared_statement: ptr lbug_prepared_statement_570425800; + param_name: cstring; value: uint64): lbug_state_570425864 {.cdecl, + importc: "lbug_prepared_statement_bind_uint64".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_bind_uint64" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_bind_uint32): + proc lbug_prepared_statement_bind_uint32*( + prepared_statement: ptr lbug_prepared_statement_570425800; + param_name: cstring; value: uint32): lbug_state_570425864 {.cdecl, + importc: "lbug_prepared_statement_bind_uint32".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_bind_uint32" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_bind_uint16): + proc lbug_prepared_statement_bind_uint16*( + prepared_statement: ptr lbug_prepared_statement_570425800; + param_name: cstring; value: uint16): lbug_state_570425864 {.cdecl, + importc: "lbug_prepared_statement_bind_uint16".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_bind_uint16" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_bind_uint8): + proc lbug_prepared_statement_bind_uint8*( + prepared_statement: ptr lbug_prepared_statement_570425800; + param_name: cstring; value: uint8): lbug_state_570425864 {.cdecl, + importc: "lbug_prepared_statement_bind_uint8".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_bind_uint8" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_bind_double): + proc lbug_prepared_statement_bind_double*( + prepared_statement: ptr lbug_prepared_statement_570425800; + param_name: cstring; value: cdouble): lbug_state_570425864 {.cdecl, + importc: "lbug_prepared_statement_bind_double".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_bind_double" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_bind_float): + proc lbug_prepared_statement_bind_float*( + prepared_statement: ptr lbug_prepared_statement_570425800; + param_name: cstring; value: cfloat): lbug_state_570425864 {.cdecl, + importc: "lbug_prepared_statement_bind_float".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_bind_float" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_bind_date): + proc lbug_prepared_statement_bind_date*( + prepared_statement: ptr lbug_prepared_statement_570425800; + param_name: cstring; value: lbug_date_t_570425824): lbug_state_570425864 {. + cdecl, importc: "lbug_prepared_statement_bind_date".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_bind_date" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_bind_timestamp_ns): + proc lbug_prepared_statement_bind_timestamp_ns*( + prepared_statement: ptr lbug_prepared_statement_570425800; + param_name: cstring; value: lbug_timestamp_ns_t_570425828): lbug_state_570425864 {. + cdecl, importc: "lbug_prepared_statement_bind_timestamp_ns".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_bind_timestamp_ns" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_bind_timestamp_sec): + proc lbug_prepared_statement_bind_timestamp_sec*( + prepared_statement: ptr lbug_prepared_statement_570425800; + param_name: cstring; value: lbug_timestamp_sec_t_570425836): lbug_state_570425864 {. + cdecl, importc: "lbug_prepared_statement_bind_timestamp_sec".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_bind_timestamp_sec" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_bind_timestamp_tz): + proc lbug_prepared_statement_bind_timestamp_tz*( + prepared_statement: ptr lbug_prepared_statement_570425800; + param_name: cstring; value: lbug_timestamp_tz_t_570425840): lbug_state_570425864 {. + cdecl, importc: "lbug_prepared_statement_bind_timestamp_tz".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_bind_timestamp_tz" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_bind_timestamp_ms): + proc lbug_prepared_statement_bind_timestamp_ms*( + prepared_statement: ptr lbug_prepared_statement_570425800; + param_name: cstring; value: lbug_timestamp_ms_t_570425832): lbug_state_570425864 {. + cdecl, importc: "lbug_prepared_statement_bind_timestamp_ms".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_bind_timestamp_ms" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_bind_timestamp): + proc lbug_prepared_statement_bind_timestamp*( + prepared_statement: ptr lbug_prepared_statement_570425800; + param_name: cstring; value: lbug_timestamp_t_570425844): lbug_state_570425864 {. + cdecl, importc: "lbug_prepared_statement_bind_timestamp".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_bind_timestamp" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_bind_interval): + proc lbug_prepared_statement_bind_interval*( + prepared_statement: ptr lbug_prepared_statement_570425800; + param_name: cstring; value: lbug_interval_t_570425848): lbug_state_570425864 {. + cdecl, importc: "lbug_prepared_statement_bind_interval".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_bind_interval" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_bind_string): + proc lbug_prepared_statement_bind_string*( + prepared_statement: ptr lbug_prepared_statement_570425800; + param_name: cstring; value: cstring): lbug_state_570425864 {.cdecl, + importc: "lbug_prepared_statement_bind_string".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_bind_string" & + " already exists, not redeclaring") +when not declared(lbug_prepared_statement_bind_value): + proc lbug_prepared_statement_bind_value*( + prepared_statement: ptr lbug_prepared_statement_570425800; + param_name: cstring; value: ptr lbug_value_570425816): lbug_state_570425864 {. + cdecl, importc: "lbug_prepared_statement_bind_value".} +else: + static : + hint("Declaration of " & "lbug_prepared_statement_bind_value" & + " already exists, not redeclaring") +when not declared(lbug_query_result_destroy): + proc lbug_query_result_destroy*(query_result: ptr lbug_query_result_570425804): void {. + cdecl, importc: "lbug_query_result_destroy".} +else: + static : + hint("Declaration of " & "lbug_query_result_destroy" & + " already exists, not redeclaring") +when not declared(lbug_query_result_is_success): + proc lbug_query_result_is_success*(query_result: ptr lbug_query_result_570425804): bool {. + cdecl, importc: "lbug_query_result_is_success".} +else: + static : + hint("Declaration of " & "lbug_query_result_is_success" & + " already exists, not redeclaring") +when not declared(lbug_query_result_get_error_message): + proc lbug_query_result_get_error_message*(query_result: ptr lbug_query_result_570425804): cstring {. + cdecl, importc: "lbug_query_result_get_error_message".} +else: + static : + hint("Declaration of " & "lbug_query_result_get_error_message" & + " already exists, not redeclaring") +when not declared(lbug_query_result_get_num_columns): + proc lbug_query_result_get_num_columns*(query_result: ptr lbug_query_result_570425804): uint64 {. + cdecl, importc: "lbug_query_result_get_num_columns".} +else: + static : + hint("Declaration of " & "lbug_query_result_get_num_columns" & + " already exists, not redeclaring") +when not declared(lbug_query_result_get_column_name): + proc lbug_query_result_get_column_name*(query_result: ptr lbug_query_result_570425804; + index: uint64; out_column_name: ptr cstring): lbug_state_570425864 {. + cdecl, importc: "lbug_query_result_get_column_name".} +else: + static : + hint("Declaration of " & "lbug_query_result_get_column_name" & + " already exists, not redeclaring") +when not declared(lbug_query_result_get_column_data_type): + proc lbug_query_result_get_column_data_type*( + query_result: ptr lbug_query_result_570425804; index: uint64; + out_column_data_type: ptr lbug_logical_type_570425812): lbug_state_570425864 {. + cdecl, importc: "lbug_query_result_get_column_data_type".} +else: + static : + hint("Declaration of " & "lbug_query_result_get_column_data_type" & + " already exists, not redeclaring") +when not declared(lbug_query_result_get_num_tuples): + proc lbug_query_result_get_num_tuples*(query_result: ptr lbug_query_result_570425804): uint64 {. + cdecl, importc: "lbug_query_result_get_num_tuples".} +else: + static : + hint("Declaration of " & "lbug_query_result_get_num_tuples" & + " already exists, not redeclaring") +when not declared(lbug_query_result_get_query_summary): + proc lbug_query_result_get_query_summary*(query_result: ptr lbug_query_result_570425804; + out_query_summary: ptr lbug_query_summary_570425852): lbug_state_570425864 {. + cdecl, importc: "lbug_query_result_get_query_summary".} +else: + static : + hint("Declaration of " & "lbug_query_result_get_query_summary" & + " already exists, not redeclaring") +when not declared(lbug_query_result_has_next): + proc lbug_query_result_has_next*(query_result: ptr lbug_query_result_570425804): bool {. + cdecl, importc: "lbug_query_result_has_next".} +else: + static : + hint("Declaration of " & "lbug_query_result_has_next" & + " already exists, not redeclaring") +when not declared(lbug_query_result_get_next): + proc lbug_query_result_get_next*(query_result: ptr lbug_query_result_570425804; + out_flat_tuple: ptr lbug_flat_tuple_570425808): lbug_state_570425864 {. + cdecl, importc: "lbug_query_result_get_next".} +else: + static : + hint("Declaration of " & "lbug_query_result_get_next" & + " already exists, not redeclaring") +when not declared(lbug_query_result_has_next_query_result): + proc lbug_query_result_has_next_query_result*( + query_result: ptr lbug_query_result_570425804): bool {.cdecl, + importc: "lbug_query_result_has_next_query_result".} +else: + static : + hint("Declaration of " & "lbug_query_result_has_next_query_result" & + " already exists, not redeclaring") +when not declared(lbug_query_result_get_next_query_result): + proc lbug_query_result_get_next_query_result*( + query_result: ptr lbug_query_result_570425804; + out_next_query_result: ptr lbug_query_result_570425804): lbug_state_570425864 {. + cdecl, importc: "lbug_query_result_get_next_query_result".} +else: + static : + hint("Declaration of " & "lbug_query_result_get_next_query_result" & + " already exists, not redeclaring") +when not declared(lbug_query_result_to_string): + proc lbug_query_result_to_string*(query_result: ptr lbug_query_result_570425804): cstring {. + cdecl, importc: "lbug_query_result_to_string".} +else: + static : + hint("Declaration of " & "lbug_query_result_to_string" & + " already exists, not redeclaring") +when not declared(lbug_query_result_reset_iterator): + proc lbug_query_result_reset_iterator*(query_result: ptr lbug_query_result_570425804): void {. + cdecl, importc: "lbug_query_result_reset_iterator".} +else: + static : + hint("Declaration of " & "lbug_query_result_reset_iterator" & + " already exists, not redeclaring") +when not declared(lbug_query_result_get_arrow_schema): + proc lbug_query_result_get_arrow_schema*(query_result: ptr lbug_query_result_570425804; + out_schema: ptr struct_ArrowSchema_570425782): lbug_state_570425864 {. + cdecl, importc: "lbug_query_result_get_arrow_schema".} +else: + static : + hint("Declaration of " & "lbug_query_result_get_arrow_schema" & + " already exists, not redeclaring") +when not declared(lbug_query_result_get_next_arrow_chunk): + proc lbug_query_result_get_next_arrow_chunk*( + query_result: ptr lbug_query_result_570425804; chunk_size: int64; + out_arrow_array: ptr struct_ArrowArray_570425784): lbug_state_570425864 {. + cdecl, importc: "lbug_query_result_get_next_arrow_chunk".} +else: + static : + hint("Declaration of " & "lbug_query_result_get_next_arrow_chunk" & + " already exists, not redeclaring") +when not declared(lbug_flat_tuple_destroy): + proc lbug_flat_tuple_destroy*(flat_tuple: ptr lbug_flat_tuple_570425808): void {. + cdecl, importc: "lbug_flat_tuple_destroy".} +else: + static : + hint("Declaration of " & "lbug_flat_tuple_destroy" & + " already exists, not redeclaring") +when not declared(lbug_flat_tuple_get_value): + proc lbug_flat_tuple_get_value*(flat_tuple: ptr lbug_flat_tuple_570425808; + index: uint64; out_value: ptr lbug_value_570425816): lbug_state_570425864 {. + cdecl, importc: "lbug_flat_tuple_get_value".} +else: + static : + hint("Declaration of " & "lbug_flat_tuple_get_value" & + " already exists, not redeclaring") +when not declared(lbug_flat_tuple_to_string): + proc lbug_flat_tuple_to_string*(flat_tuple: ptr lbug_flat_tuple_570425808): cstring {. + cdecl, importc: "lbug_flat_tuple_to_string".} +else: + static : + hint("Declaration of " & "lbug_flat_tuple_to_string" & + " already exists, not redeclaring") +when not declared(lbug_data_type_create): + proc lbug_data_type_create*(id: lbug_data_type_id_570425860; + child_type: ptr lbug_logical_type_570425812; + num_elements_in_array: uint64; + out_type: ptr lbug_logical_type_570425812): void {. + cdecl, importc: "lbug_data_type_create".} +else: + static : + hint("Declaration of " & "lbug_data_type_create" & + " already exists, not redeclaring") +when not declared(lbug_data_type_clone): + proc lbug_data_type_clone*(data_type: ptr lbug_logical_type_570425812; + out_type: ptr lbug_logical_type_570425812): void {. + cdecl, importc: "lbug_data_type_clone".} +else: + static : + hint("Declaration of " & "lbug_data_type_clone" & + " already exists, not redeclaring") +when not declared(lbug_data_type_destroy): + proc lbug_data_type_destroy*(data_type: ptr lbug_logical_type_570425812): void {. + cdecl, importc: "lbug_data_type_destroy".} +else: + static : + hint("Declaration of " & "lbug_data_type_destroy" & + " already exists, not redeclaring") +when not declared(lbug_data_type_equals): + proc lbug_data_type_equals*(data_type1: ptr lbug_logical_type_570425812; + data_type2: ptr lbug_logical_type_570425812): bool {. + cdecl, importc: "lbug_data_type_equals".} +else: + static : + hint("Declaration of " & "lbug_data_type_equals" & + " already exists, not redeclaring") +when not declared(lbug_data_type_get_id): + proc lbug_data_type_get_id*(data_type: ptr lbug_logical_type_570425812): lbug_data_type_id_570425860 {. + cdecl, importc: "lbug_data_type_get_id".} +else: + static : + hint("Declaration of " & "lbug_data_type_get_id" & + " already exists, not redeclaring") +when not declared(lbug_data_type_get_num_elements_in_array): + proc lbug_data_type_get_num_elements_in_array*( + data_type: ptr lbug_logical_type_570425812; out_result: ptr uint64): lbug_state_570425864 {. + cdecl, importc: "lbug_data_type_get_num_elements_in_array".} +else: + static : + hint("Declaration of " & "lbug_data_type_get_num_elements_in_array" & + " already exists, not redeclaring") +when not declared(lbug_value_create_null): + proc lbug_value_create_null*(): ptr lbug_value_570425816 {.cdecl, + importc: "lbug_value_create_null".} +else: + static : + hint("Declaration of " & "lbug_value_create_null" & + " already exists, not redeclaring") +when not declared(lbug_value_create_null_with_data_type): + proc lbug_value_create_null_with_data_type*(data_type: ptr lbug_logical_type_570425812): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_null_with_data_type".} +else: + static : + hint("Declaration of " & "lbug_value_create_null_with_data_type" & + " already exists, not redeclaring") +when not declared(lbug_value_is_null): + proc lbug_value_is_null*(value: ptr lbug_value_570425816): bool {.cdecl, + importc: "lbug_value_is_null".} +else: + static : + hint("Declaration of " & "lbug_value_is_null" & + " already exists, not redeclaring") +when not declared(lbug_value_set_null): + proc lbug_value_set_null*(value: ptr lbug_value_570425816; is_null: bool): void {. + cdecl, importc: "lbug_value_set_null".} +else: + static : + hint("Declaration of " & "lbug_value_set_null" & + " already exists, not redeclaring") +when not declared(lbug_value_create_default): + proc lbug_value_create_default*(data_type: ptr lbug_logical_type_570425812): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_default".} +else: + static : + hint("Declaration of " & "lbug_value_create_default" & + " already exists, not redeclaring") +when not declared(lbug_value_create_bool): + proc lbug_value_create_bool*(val_private: bool): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_bool".} +else: + static : + hint("Declaration of " & "lbug_value_create_bool" & + " already exists, not redeclaring") +when not declared(lbug_value_create_int8): + proc lbug_value_create_int8*(val_private: int8): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_int8".} +else: + static : + hint("Declaration of " & "lbug_value_create_int8" & + " already exists, not redeclaring") +when not declared(lbug_value_create_int16): + proc lbug_value_create_int16*(val_private: int16): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_int16".} +else: + static : + hint("Declaration of " & "lbug_value_create_int16" & + " already exists, not redeclaring") +when not declared(lbug_value_create_int32): + proc lbug_value_create_int32*(val_private: int32): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_int32".} +else: + static : + hint("Declaration of " & "lbug_value_create_int32" & + " already exists, not redeclaring") +when not declared(lbug_value_create_int64): + proc lbug_value_create_int64*(val_private: int64): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_int64".} +else: + static : + hint("Declaration of " & "lbug_value_create_int64" & + " already exists, not redeclaring") +when not declared(lbug_value_create_uint8): + proc lbug_value_create_uint8*(val_private: uint8): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_uint8".} +else: + static : + hint("Declaration of " & "lbug_value_create_uint8" & + " already exists, not redeclaring") +when not declared(lbug_value_create_uint16): + proc lbug_value_create_uint16*(val_private: uint16): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_uint16".} +else: + static : + hint("Declaration of " & "lbug_value_create_uint16" & + " already exists, not redeclaring") +when not declared(lbug_value_create_uint32): + proc lbug_value_create_uint32*(val_private: uint32): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_uint32".} +else: + static : + hint("Declaration of " & "lbug_value_create_uint32" & + " already exists, not redeclaring") +when not declared(lbug_value_create_uint64): + proc lbug_value_create_uint64*(val_private: uint64): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_uint64".} +else: + static : + hint("Declaration of " & "lbug_value_create_uint64" & + " already exists, not redeclaring") +when not declared(lbug_value_create_int128): + proc lbug_value_create_int128*(val_private: lbug_int128_t_570425856): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_int128".} +else: + static : + hint("Declaration of " & "lbug_value_create_int128" & + " already exists, not redeclaring") +when not declared(lbug_value_create_float): + proc lbug_value_create_float*(val_private: cfloat): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_float".} +else: + static : + hint("Declaration of " & "lbug_value_create_float" & + " already exists, not redeclaring") +when not declared(lbug_value_create_double): + proc lbug_value_create_double*(val_private: cdouble): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_double".} +else: + static : + hint("Declaration of " & "lbug_value_create_double" & + " already exists, not redeclaring") +when not declared(lbug_value_create_internal_id): + proc lbug_value_create_internal_id*(val_private: lbug_internal_id_t_570425820): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_internal_id".} +else: + static : + hint("Declaration of " & "lbug_value_create_internal_id" & + " already exists, not redeclaring") +when not declared(lbug_value_create_date): + proc lbug_value_create_date*(val_private: lbug_date_t_570425824): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_date".} +else: + static : + hint("Declaration of " & "lbug_value_create_date" & + " already exists, not redeclaring") +when not declared(lbug_value_create_timestamp_ns): + proc lbug_value_create_timestamp_ns*(val_private: lbug_timestamp_ns_t_570425828): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_timestamp_ns".} +else: + static : + hint("Declaration of " & "lbug_value_create_timestamp_ns" & + " already exists, not redeclaring") +when not declared(lbug_value_create_timestamp_ms): + proc lbug_value_create_timestamp_ms*(val_private: lbug_timestamp_ms_t_570425832): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_timestamp_ms".} +else: + static : + hint("Declaration of " & "lbug_value_create_timestamp_ms" & + " already exists, not redeclaring") +when not declared(lbug_value_create_timestamp_sec): + proc lbug_value_create_timestamp_sec*(val_private: lbug_timestamp_sec_t_570425836): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_timestamp_sec".} +else: + static : + hint("Declaration of " & "lbug_value_create_timestamp_sec" & + " already exists, not redeclaring") +when not declared(lbug_value_create_timestamp_tz): + proc lbug_value_create_timestamp_tz*(val_private: lbug_timestamp_tz_t_570425840): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_timestamp_tz".} +else: + static : + hint("Declaration of " & "lbug_value_create_timestamp_tz" & + " already exists, not redeclaring") +when not declared(lbug_value_create_timestamp): + proc lbug_value_create_timestamp*(val_private: lbug_timestamp_t_570425844): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_timestamp".} +else: + static : + hint("Declaration of " & "lbug_value_create_timestamp" & + " already exists, not redeclaring") +when not declared(lbug_value_create_interval): + proc lbug_value_create_interval*(val_private: lbug_interval_t_570425848): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_interval".} +else: + static : + hint("Declaration of " & "lbug_value_create_interval" & + " already exists, not redeclaring") +when not declared(lbug_value_create_string): + proc lbug_value_create_string*(val_private: cstring): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_create_string".} +else: + static : + hint("Declaration of " & "lbug_value_create_string" & + " already exists, not redeclaring") +when not declared(lbug_value_create_list): + proc lbug_value_create_list*(num_elements: uint64; + elements: ptr ptr lbug_value_570425816; + out_value: ptr ptr lbug_value_570425816): lbug_state_570425864 {. + cdecl, importc: "lbug_value_create_list".} +else: + static : + hint("Declaration of " & "lbug_value_create_list" & + " already exists, not redeclaring") +when not declared(lbug_value_create_struct): + proc lbug_value_create_struct*(num_fields: uint64; field_names: ptr cstring; + field_values: ptr ptr lbug_value_570425816; + out_value: ptr ptr lbug_value_570425816): lbug_state_570425864 {. + cdecl, importc: "lbug_value_create_struct".} +else: + static : + hint("Declaration of " & "lbug_value_create_struct" & + " already exists, not redeclaring") +when not declared(lbug_value_create_map): + proc lbug_value_create_map*(num_fields: uint64; keys: ptr ptr lbug_value_570425816; + values: ptr ptr lbug_value_570425816; + out_value: ptr ptr lbug_value_570425816): lbug_state_570425864 {. + cdecl, importc: "lbug_value_create_map".} +else: + static : + hint("Declaration of " & "lbug_value_create_map" & + " already exists, not redeclaring") +when not declared(lbug_value_clone): + proc lbug_value_clone*(value: ptr lbug_value_570425816): ptr lbug_value_570425816 {. + cdecl, importc: "lbug_value_clone".} +else: + static : + hint("Declaration of " & "lbug_value_clone" & + " already exists, not redeclaring") +when not declared(lbug_value_copy): + proc lbug_value_copy*(value: ptr lbug_value_570425816; other: ptr lbug_value_570425816): void {. + cdecl, importc: "lbug_value_copy".} +else: + static : + hint("Declaration of " & "lbug_value_copy" & + " already exists, not redeclaring") +when not declared(lbug_value_destroy): + proc lbug_value_destroy*(value: ptr lbug_value_570425816): void {.cdecl, + importc: "lbug_value_destroy".} +else: + static : + hint("Declaration of " & "lbug_value_destroy" & + " already exists, not redeclaring") +when not declared(lbug_value_get_list_size): + proc lbug_value_get_list_size*(value: ptr lbug_value_570425816; + out_result: ptr uint64): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_list_size".} +else: + static : + hint("Declaration of " & "lbug_value_get_list_size" & + " already exists, not redeclaring") +when not declared(lbug_value_get_list_element): + proc lbug_value_get_list_element*(value: ptr lbug_value_570425816; + index: uint64; out_value: ptr lbug_value_570425816): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_list_element".} +else: + static : + hint("Declaration of " & "lbug_value_get_list_element" & + " already exists, not redeclaring") +when not declared(lbug_value_get_struct_num_fields): + proc lbug_value_get_struct_num_fields*(value: ptr lbug_value_570425816; + out_result: ptr uint64): lbug_state_570425864 {.cdecl, + importc: "lbug_value_get_struct_num_fields".} +else: + static : + hint("Declaration of " & "lbug_value_get_struct_num_fields" & + " already exists, not redeclaring") +when not declared(lbug_value_get_struct_field_name): + proc lbug_value_get_struct_field_name*(value: ptr lbug_value_570425816; + index: uint64; out_result: ptr cstring): lbug_state_570425864 {.cdecl, + importc: "lbug_value_get_struct_field_name".} +else: + static : + hint("Declaration of " & "lbug_value_get_struct_field_name" & + " already exists, not redeclaring") +when not declared(lbug_value_get_struct_field_value): + proc lbug_value_get_struct_field_value*(value: ptr lbug_value_570425816; + index: uint64; out_value: ptr lbug_value_570425816): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_struct_field_value".} +else: + static : + hint("Declaration of " & "lbug_value_get_struct_field_value" & + " already exists, not redeclaring") +when not declared(lbug_value_get_map_size): + proc lbug_value_get_map_size*(value: ptr lbug_value_570425816; + out_result: ptr uint64): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_map_size".} +else: + static : + hint("Declaration of " & "lbug_value_get_map_size" & + " already exists, not redeclaring") +when not declared(lbug_value_get_map_key): + proc lbug_value_get_map_key*(value: ptr lbug_value_570425816; index: uint64; + out_key: ptr lbug_value_570425816): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_map_key".} +else: + static : + hint("Declaration of " & "lbug_value_get_map_key" & + " already exists, not redeclaring") +when not declared(lbug_value_get_map_value): + proc lbug_value_get_map_value*(value: ptr lbug_value_570425816; index: uint64; + out_value: ptr lbug_value_570425816): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_map_value".} +else: + static : + hint("Declaration of " & "lbug_value_get_map_value" & + " already exists, not redeclaring") +when not declared(lbug_value_get_recursive_rel_node_list): + proc lbug_value_get_recursive_rel_node_list*(value: ptr lbug_value_570425816; + out_value: ptr lbug_value_570425816): lbug_state_570425864 {.cdecl, + importc: "lbug_value_get_recursive_rel_node_list".} +else: + static : + hint("Declaration of " & "lbug_value_get_recursive_rel_node_list" & + " already exists, not redeclaring") +when not declared(lbug_value_get_recursive_rel_rel_list): + proc lbug_value_get_recursive_rel_rel_list*(value: ptr lbug_value_570425816; + out_value: ptr lbug_value_570425816): lbug_state_570425864 {.cdecl, + importc: "lbug_value_get_recursive_rel_rel_list".} +else: + static : + hint("Declaration of " & "lbug_value_get_recursive_rel_rel_list" & + " already exists, not redeclaring") +when not declared(lbug_value_get_data_type): + proc lbug_value_get_data_type*(value: ptr lbug_value_570425816; + out_type: ptr lbug_logical_type_570425812): void {. + cdecl, importc: "lbug_value_get_data_type".} +else: + static : + hint("Declaration of " & "lbug_value_get_data_type" & + " already exists, not redeclaring") +when not declared(lbug_value_get_bool): + proc lbug_value_get_bool*(value: ptr lbug_value_570425816; + out_result: ptr bool): lbug_state_570425864 {.cdecl, + importc: "lbug_value_get_bool".} +else: + static : + hint("Declaration of " & "lbug_value_get_bool" & + " already exists, not redeclaring") +when not declared(lbug_value_get_int8): + proc lbug_value_get_int8*(value: ptr lbug_value_570425816; + out_result: ptr int8): lbug_state_570425864 {.cdecl, + importc: "lbug_value_get_int8".} +else: + static : + hint("Declaration of " & "lbug_value_get_int8" & + " already exists, not redeclaring") +when not declared(lbug_value_get_int16): + proc lbug_value_get_int16*(value: ptr lbug_value_570425816; + out_result: ptr int16): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_int16".} +else: + static : + hint("Declaration of " & "lbug_value_get_int16" & + " already exists, not redeclaring") +when not declared(lbug_value_get_int32): + proc lbug_value_get_int32*(value: ptr lbug_value_570425816; + out_result: ptr int32): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_int32".} +else: + static : + hint("Declaration of " & "lbug_value_get_int32" & + " already exists, not redeclaring") +when not declared(lbug_value_get_int64): + proc lbug_value_get_int64*(value: ptr lbug_value_570425816; + out_result: ptr int64): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_int64".} +else: + static : + hint("Declaration of " & "lbug_value_get_int64" & + " already exists, not redeclaring") +when not declared(lbug_value_get_uint8): + proc lbug_value_get_uint8*(value: ptr lbug_value_570425816; + out_result: ptr uint8): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_uint8".} +else: + static : + hint("Declaration of " & "lbug_value_get_uint8" & + " already exists, not redeclaring") +when not declared(lbug_value_get_uint16): + proc lbug_value_get_uint16*(value: ptr lbug_value_570425816; + out_result: ptr uint16): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_uint16".} +else: + static : + hint("Declaration of " & "lbug_value_get_uint16" & + " already exists, not redeclaring") +when not declared(lbug_value_get_uint32): + proc lbug_value_get_uint32*(value: ptr lbug_value_570425816; + out_result: ptr uint32): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_uint32".} +else: + static : + hint("Declaration of " & "lbug_value_get_uint32" & + " already exists, not redeclaring") +when not declared(lbug_value_get_uint64): + proc lbug_value_get_uint64*(value: ptr lbug_value_570425816; + out_result: ptr uint64): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_uint64".} +else: + static : + hint("Declaration of " & "lbug_value_get_uint64" & + " already exists, not redeclaring") +when not declared(lbug_value_get_int128): + proc lbug_value_get_int128*(value: ptr lbug_value_570425816; + out_result: ptr lbug_int128_t_570425856): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_int128".} +else: + static : + hint("Declaration of " & "lbug_value_get_int128" & + " already exists, not redeclaring") +when not declared(lbug_int128_t_from_string): + proc lbug_int128_t_from_string*(str: cstring; out_result: ptr lbug_int128_t_570425856): lbug_state_570425864 {. + cdecl, importc: "lbug_int128_t_from_string".} +else: + static : + hint("Declaration of " & "lbug_int128_t_from_string" & + " already exists, not redeclaring") +when not declared(lbug_int128_t_to_string): + proc lbug_int128_t_to_string*(val: lbug_int128_t_570425856; + out_result: ptr cstring): lbug_state_570425864 {. + cdecl, importc: "lbug_int128_t_to_string".} +else: + static : + hint("Declaration of " & "lbug_int128_t_to_string" & + " already exists, not redeclaring") +when not declared(lbug_value_get_float): + proc lbug_value_get_float*(value: ptr lbug_value_570425816; + out_result: ptr cfloat): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_float".} +else: + static : + hint("Declaration of " & "lbug_value_get_float" & + " already exists, not redeclaring") +when not declared(lbug_value_get_double): + proc lbug_value_get_double*(value: ptr lbug_value_570425816; + out_result: ptr cdouble): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_double".} +else: + static : + hint("Declaration of " & "lbug_value_get_double" & + " already exists, not redeclaring") +when not declared(lbug_value_get_internal_id): + proc lbug_value_get_internal_id*(value: ptr lbug_value_570425816; + out_result: ptr lbug_internal_id_t_570425820): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_internal_id".} +else: + static : + hint("Declaration of " & "lbug_value_get_internal_id" & + " already exists, not redeclaring") +when not declared(lbug_value_get_date): + proc lbug_value_get_date*(value: ptr lbug_value_570425816; + out_result: ptr lbug_date_t_570425824): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_date".} +else: + static : + hint("Declaration of " & "lbug_value_get_date" & + " already exists, not redeclaring") +when not declared(lbug_value_get_timestamp): + proc lbug_value_get_timestamp*(value: ptr lbug_value_570425816; + out_result: ptr lbug_timestamp_t_570425844): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_timestamp".} +else: + static : + hint("Declaration of " & "lbug_value_get_timestamp" & + " already exists, not redeclaring") +when not declared(lbug_value_get_timestamp_ns): + proc lbug_value_get_timestamp_ns*(value: ptr lbug_value_570425816; + out_result: ptr lbug_timestamp_ns_t_570425828): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_timestamp_ns".} +else: + static : + hint("Declaration of " & "lbug_value_get_timestamp_ns" & + " already exists, not redeclaring") +when not declared(lbug_value_get_timestamp_ms): + proc lbug_value_get_timestamp_ms*(value: ptr lbug_value_570425816; + out_result: ptr lbug_timestamp_ms_t_570425832): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_timestamp_ms".} +else: + static : + hint("Declaration of " & "lbug_value_get_timestamp_ms" & + " already exists, not redeclaring") +when not declared(lbug_value_get_timestamp_sec): + proc lbug_value_get_timestamp_sec*(value: ptr lbug_value_570425816; + out_result: ptr lbug_timestamp_sec_t_570425836): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_timestamp_sec".} +else: + static : + hint("Declaration of " & "lbug_value_get_timestamp_sec" & + " already exists, not redeclaring") +when not declared(lbug_value_get_timestamp_tz): + proc lbug_value_get_timestamp_tz*(value: ptr lbug_value_570425816; + out_result: ptr lbug_timestamp_tz_t_570425840): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_timestamp_tz".} +else: + static : + hint("Declaration of " & "lbug_value_get_timestamp_tz" & + " already exists, not redeclaring") +when not declared(lbug_value_get_interval): + proc lbug_value_get_interval*(value: ptr lbug_value_570425816; + out_result: ptr lbug_interval_t_570425848): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_interval".} +else: + static : + hint("Declaration of " & "lbug_value_get_interval" & + " already exists, not redeclaring") +when not declared(lbug_value_get_decimal_as_string): + proc lbug_value_get_decimal_as_string*(value: ptr lbug_value_570425816; + out_result: ptr cstring): lbug_state_570425864 {.cdecl, + importc: "lbug_value_get_decimal_as_string".} +else: + static : + hint("Declaration of " & "lbug_value_get_decimal_as_string" & + " already exists, not redeclaring") +when not declared(lbug_value_get_string): + proc lbug_value_get_string*(value: ptr lbug_value_570425816; + out_result: ptr cstring): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_string".} +else: + static : + hint("Declaration of " & "lbug_value_get_string" & + " already exists, not redeclaring") +when not declared(lbug_value_get_blob): + proc lbug_value_get_blob*(value: ptr lbug_value_570425816; + out_result: ptr ptr uint8): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_blob".} +else: + static : + hint("Declaration of " & "lbug_value_get_blob" & + " already exists, not redeclaring") +when not declared(lbug_value_get_uuid): + proc lbug_value_get_uuid*(value: ptr lbug_value_570425816; + out_result: ptr cstring): lbug_state_570425864 {. + cdecl, importc: "lbug_value_get_uuid".} +else: + static : + hint("Declaration of " & "lbug_value_get_uuid" & + " already exists, not redeclaring") +when not declared(lbug_value_to_string): + proc lbug_value_to_string*(value: ptr lbug_value_570425816): cstring {.cdecl, + importc: "lbug_value_to_string".} +else: + static : + hint("Declaration of " & "lbug_value_to_string" & + " already exists, not redeclaring") +when not declared(lbug_node_val_get_id_val): + proc lbug_node_val_get_id_val*(node_val: ptr lbug_value_570425816; + out_value: ptr lbug_value_570425816): lbug_state_570425864 {. + cdecl, importc: "lbug_node_val_get_id_val".} +else: + static : + hint("Declaration of " & "lbug_node_val_get_id_val" & + " already exists, not redeclaring") +when not declared(lbug_node_val_get_label_val): + proc lbug_node_val_get_label_val*(node_val: ptr lbug_value_570425816; + out_value: ptr lbug_value_570425816): lbug_state_570425864 {. + cdecl, importc: "lbug_node_val_get_label_val".} +else: + static : + hint("Declaration of " & "lbug_node_val_get_label_val" & + " already exists, not redeclaring") +when not declared(lbug_node_val_get_property_size): + proc lbug_node_val_get_property_size*(node_val: ptr lbug_value_570425816; + out_value: ptr uint64): lbug_state_570425864 {. + cdecl, importc: "lbug_node_val_get_property_size".} +else: + static : + hint("Declaration of " & "lbug_node_val_get_property_size" & + " already exists, not redeclaring") +when not declared(lbug_node_val_get_property_name_at): + proc lbug_node_val_get_property_name_at*(node_val: ptr lbug_value_570425816; + index: uint64; out_result: ptr cstring): lbug_state_570425864 {.cdecl, + importc: "lbug_node_val_get_property_name_at".} +else: + static : + hint("Declaration of " & "lbug_node_val_get_property_name_at" & + " already exists, not redeclaring") +when not declared(lbug_node_val_get_property_value_at): + proc lbug_node_val_get_property_value_at*(node_val: ptr lbug_value_570425816; + index: uint64; out_value: ptr lbug_value_570425816): lbug_state_570425864 {. + cdecl, importc: "lbug_node_val_get_property_value_at".} +else: + static : + hint("Declaration of " & "lbug_node_val_get_property_value_at" & + " already exists, not redeclaring") +when not declared(lbug_node_val_to_string): + proc lbug_node_val_to_string*(node_val: ptr lbug_value_570425816; + out_result: ptr cstring): lbug_state_570425864 {. + cdecl, importc: "lbug_node_val_to_string".} +else: + static : + hint("Declaration of " & "lbug_node_val_to_string" & + " already exists, not redeclaring") +when not declared(lbug_rel_val_get_id_val): + proc lbug_rel_val_get_id_val*(rel_val: ptr lbug_value_570425816; + out_value: ptr lbug_value_570425816): lbug_state_570425864 {. + cdecl, importc: "lbug_rel_val_get_id_val".} +else: + static : + hint("Declaration of " & "lbug_rel_val_get_id_val" & + " already exists, not redeclaring") +when not declared(lbug_rel_val_get_src_id_val): + proc lbug_rel_val_get_src_id_val*(rel_val: ptr lbug_value_570425816; + out_value: ptr lbug_value_570425816): lbug_state_570425864 {. + cdecl, importc: "lbug_rel_val_get_src_id_val".} +else: + static : + hint("Declaration of " & "lbug_rel_val_get_src_id_val" & + " already exists, not redeclaring") +when not declared(lbug_rel_val_get_dst_id_val): + proc lbug_rel_val_get_dst_id_val*(rel_val: ptr lbug_value_570425816; + out_value: ptr lbug_value_570425816): lbug_state_570425864 {. + cdecl, importc: "lbug_rel_val_get_dst_id_val".} +else: + static : + hint("Declaration of " & "lbug_rel_val_get_dst_id_val" & + " already exists, not redeclaring") +when not declared(lbug_rel_val_get_label_val): + proc lbug_rel_val_get_label_val*(rel_val: ptr lbug_value_570425816; + out_value: ptr lbug_value_570425816): lbug_state_570425864 {. + cdecl, importc: "lbug_rel_val_get_label_val".} +else: + static : + hint("Declaration of " & "lbug_rel_val_get_label_val" & + " already exists, not redeclaring") +when not declared(lbug_rel_val_get_property_size): + proc lbug_rel_val_get_property_size*(rel_val: ptr lbug_value_570425816; + out_value: ptr uint64): lbug_state_570425864 {. + cdecl, importc: "lbug_rel_val_get_property_size".} +else: + static : + hint("Declaration of " & "lbug_rel_val_get_property_size" & + " already exists, not redeclaring") +when not declared(lbug_rel_val_get_property_name_at): + proc lbug_rel_val_get_property_name_at*(rel_val: ptr lbug_value_570425816; + index: uint64; out_result: ptr cstring): lbug_state_570425864 {.cdecl, + importc: "lbug_rel_val_get_property_name_at".} +else: + static : + hint("Declaration of " & "lbug_rel_val_get_property_name_at" & + " already exists, not redeclaring") +when not declared(lbug_rel_val_get_property_value_at): + proc lbug_rel_val_get_property_value_at*(rel_val: ptr lbug_value_570425816; + index: uint64; out_value: ptr lbug_value_570425816): lbug_state_570425864 {. + cdecl, importc: "lbug_rel_val_get_property_value_at".} +else: + static : + hint("Declaration of " & "lbug_rel_val_get_property_value_at" & + " already exists, not redeclaring") +when not declared(lbug_rel_val_to_string): + proc lbug_rel_val_to_string*(rel_val: ptr lbug_value_570425816; + out_result: ptr cstring): lbug_state_570425864 {. + cdecl, importc: "lbug_rel_val_to_string".} +else: + static : + hint("Declaration of " & "lbug_rel_val_to_string" & + " already exists, not redeclaring") +when not declared(lbug_destroy_string): + proc lbug_destroy_string*(str: cstring): void {.cdecl, + importc: "lbug_destroy_string".} +else: + static : + hint("Declaration of " & "lbug_destroy_string" & + " already exists, not redeclaring") +when not declared(lbug_destroy_blob): + proc lbug_destroy_blob*(blob: ptr uint8): void {.cdecl, + importc: "lbug_destroy_blob".} +else: + static : + hint("Declaration of " & "lbug_destroy_blob" & + " already exists, not redeclaring") +when not declared(lbug_query_summary_destroy): + proc lbug_query_summary_destroy*(query_summary: ptr lbug_query_summary_570425852): void {. + cdecl, importc: "lbug_query_summary_destroy".} +else: + static : + hint("Declaration of " & "lbug_query_summary_destroy" & + " already exists, not redeclaring") +when not declared(lbug_query_summary_get_compiling_time): + proc lbug_query_summary_get_compiling_time*( + query_summary: ptr lbug_query_summary_570425852): cdouble {.cdecl, + importc: "lbug_query_summary_get_compiling_time".} +else: + static : + hint("Declaration of " & "lbug_query_summary_get_compiling_time" & + " already exists, not redeclaring") +when not declared(lbug_query_summary_get_execution_time): + proc lbug_query_summary_get_execution_time*( + query_summary: ptr lbug_query_summary_570425852): cdouble {.cdecl, + importc: "lbug_query_summary_get_execution_time".} +else: + static : + hint("Declaration of " & "lbug_query_summary_get_execution_time" & + " already exists, not redeclaring") +when not declared(lbug_timestamp_ns_to_tm): + proc lbug_timestamp_ns_to_tm*(timestamp: lbug_timestamp_ns_t_570425828; + out_result: ptr struct_tm_570425866): lbug_state_570425864 {. + cdecl, importc: "lbug_timestamp_ns_to_tm".} +else: + static : + hint("Declaration of " & "lbug_timestamp_ns_to_tm" & + " already exists, not redeclaring") +when not declared(lbug_timestamp_ms_to_tm): + proc lbug_timestamp_ms_to_tm*(timestamp: lbug_timestamp_ms_t_570425832; + out_result: ptr struct_tm_570425866): lbug_state_570425864 {. + cdecl, importc: "lbug_timestamp_ms_to_tm".} +else: + static : + hint("Declaration of " & "lbug_timestamp_ms_to_tm" & + " already exists, not redeclaring") +when not declared(lbug_timestamp_sec_to_tm): + proc lbug_timestamp_sec_to_tm*(timestamp: lbug_timestamp_sec_t_570425836; + out_result: ptr struct_tm_570425866): lbug_state_570425864 {. + cdecl, importc: "lbug_timestamp_sec_to_tm".} +else: + static : + hint("Declaration of " & "lbug_timestamp_sec_to_tm" & + " already exists, not redeclaring") +when not declared(lbug_timestamp_tz_to_tm): + proc lbug_timestamp_tz_to_tm*(timestamp: lbug_timestamp_tz_t_570425840; + out_result: ptr struct_tm_570425866): lbug_state_570425864 {. + cdecl, importc: "lbug_timestamp_tz_to_tm".} +else: + static : + hint("Declaration of " & "lbug_timestamp_tz_to_tm" & + " already exists, not redeclaring") +when not declared(lbug_timestamp_to_tm): + proc lbug_timestamp_to_tm*(timestamp: lbug_timestamp_t_570425844; + out_result: ptr struct_tm_570425866): lbug_state_570425864 {. + cdecl, importc: "lbug_timestamp_to_tm".} +else: + static : + hint("Declaration of " & "lbug_timestamp_to_tm" & + " already exists, not redeclaring") +when not declared(lbug_timestamp_ns_from_tm): + proc lbug_timestamp_ns_from_tm*(tm: struct_tm_570425866; + out_result: ptr lbug_timestamp_ns_t_570425828): lbug_state_570425864 {. + cdecl, importc: "lbug_timestamp_ns_from_tm".} +else: + static : + hint("Declaration of " & "lbug_timestamp_ns_from_tm" & + " already exists, not redeclaring") +when not declared(lbug_timestamp_ms_from_tm): + proc lbug_timestamp_ms_from_tm*(tm: struct_tm_570425866; + out_result: ptr lbug_timestamp_ms_t_570425832): lbug_state_570425864 {. + cdecl, importc: "lbug_timestamp_ms_from_tm".} +else: + static : + hint("Declaration of " & "lbug_timestamp_ms_from_tm" & + " already exists, not redeclaring") +when not declared(lbug_timestamp_sec_from_tm): + proc lbug_timestamp_sec_from_tm*(tm: struct_tm_570425866; + out_result: ptr lbug_timestamp_sec_t_570425836): lbug_state_570425864 {. + cdecl, importc: "lbug_timestamp_sec_from_tm".} +else: + static : + hint("Declaration of " & "lbug_timestamp_sec_from_tm" & + " already exists, not redeclaring") +when not declared(lbug_timestamp_tz_from_tm): + proc lbug_timestamp_tz_from_tm*(tm: struct_tm_570425866; + out_result: ptr lbug_timestamp_tz_t_570425840): lbug_state_570425864 {. + cdecl, importc: "lbug_timestamp_tz_from_tm".} +else: + static : + hint("Declaration of " & "lbug_timestamp_tz_from_tm" & + " already exists, not redeclaring") +when not declared(lbug_timestamp_from_tm): + proc lbug_timestamp_from_tm*(tm: struct_tm_570425866; + out_result: ptr lbug_timestamp_t_570425844): lbug_state_570425864 {. + cdecl, importc: "lbug_timestamp_from_tm".} +else: + static : + hint("Declaration of " & "lbug_timestamp_from_tm" & + " already exists, not redeclaring") +when not declared(lbug_date_to_string): + proc lbug_date_to_string*(date: lbug_date_t_570425824; out_result: ptr cstring): lbug_state_570425864 {. + cdecl, importc: "lbug_date_to_string".} +else: + static : + hint("Declaration of " & "lbug_date_to_string" & + " already exists, not redeclaring") +when not declared(lbug_date_from_string): + proc lbug_date_from_string*(str: cstring; out_result: ptr lbug_date_t_570425824): lbug_state_570425864 {. + cdecl, importc: "lbug_date_from_string".} +else: + static : + hint("Declaration of " & "lbug_date_from_string" & + " already exists, not redeclaring") +when not declared(lbug_date_to_tm): + proc lbug_date_to_tm*(date: lbug_date_t_570425824; out_result: ptr struct_tm_570425866): lbug_state_570425864 {. + cdecl, importc: "lbug_date_to_tm".} +else: + static : + hint("Declaration of " & "lbug_date_to_tm" & + " already exists, not redeclaring") +when not declared(lbug_date_from_tm): + proc lbug_date_from_tm*(tm: struct_tm_570425866; out_result: ptr lbug_date_t_570425824): lbug_state_570425864 {. + cdecl, importc: "lbug_date_from_tm".} +else: + static : + hint("Declaration of " & "lbug_date_from_tm" & + " already exists, not redeclaring") +when not declared(lbug_interval_to_difftime): + proc lbug_interval_to_difftime*(interval: lbug_interval_t_570425848; + out_result: ptr cdouble): void {.cdecl, + importc: "lbug_interval_to_difftime".} +else: + static : + hint("Declaration of " & "lbug_interval_to_difftime" & + " already exists, not redeclaring") +when not declared(lbug_interval_from_difftime): + proc lbug_interval_from_difftime*(difftime: cdouble; + out_result: ptr lbug_interval_t_570425848): void {. + cdecl, importc: "lbug_interval_from_difftime".} +else: + static : + hint("Declaration of " & "lbug_interval_from_difftime" & + " already exists, not redeclaring") +when not declared(lbug_get_version): + proc lbug_get_version*(): cstring {.cdecl, importc: "lbug_get_version".} +else: + static : + hint("Declaration of " & "lbug_get_version" & + " already exists, not redeclaring") +when not declared(lbug_get_storage_version): + proc lbug_get_storage_version*(): uint64 {.cdecl, + importc: "lbug_get_storage_version".} +else: + static : + hint("Declaration of " & "lbug_get_storage_version" & + " already exists, not redeclaring") \ No newline at end of file diff --git a/src/lbug/config.nim b/src/lbug/config.nim new file mode 100644 index 0000000..bfd608d --- /dev/null +++ b/src/lbug/config.nim @@ -0,0 +1,24 @@ +# vim: set et sta sw=4 ts=4 : + +func lbugConfig*( + buffer_pool_size = LBUG_DEFAULT_CONFIG.buffer_pool_size, + max_num_threads = LBUG_DEFAULT_CONFIG.max_num_threads, + enable_compression = LBUG_DEFAULT_CONFIG.enable_compression, + read_only = LBUG_DEFAULT_CONFIG.read_only, + max_db_size = LBUG_DEFAULT_CONFIG.max_db_size, + auto_checkpoint = LBUG_DEFAULT_CONFIG.auto_checkpoint, + checkpoint_threshold = LBUG_DEFAULT_CONFIG.checkpoint_threshold + ): lbug_system_config = + ## Returns a new lbug database configuration object. + + return lbug_system_config( + buffer_pool_size: buffer_pool_size, + max_num_threads: max_num_threads, + enable_compression: enable_compression, + read_only: read_only, + max_db_size: max_db_size, + auto_checkpoint: auto_checkpoint, + checkpoint_threshold: checkpoint_threshold + ) + + diff --git a/src/lbug/connection.nim b/src/lbug/connection.nim new file mode 100644 index 0000000..799fcba --- /dev/null +++ b/src/lbug/connection.nim @@ -0,0 +1,27 @@ +# vim: set et sta sw=4 ts=4 : + +proc `=destroy`*( conn: LbugConnectionObj ) = + ## Graceful cleanup for open connection handles. + if conn.valid: + when defined( debug ): echo &"Destroying connection: {conn}" + lbug_connection_destroy( addr conn.handle ) + + +func connect*( db: LbugDatabase ): LbugConnection = + ## Connect to a database. + result = new LbugConnection + if lbug_connection_init( addr db.handle, addr result.handle ) == LbugSuccess: + result.valid = true + else: + raise newException( LbugException, "Unable to connect to the database." ) + + +func queryTimeout*( conn: LbugConnection, timeout: uint64 ) = + ## Set a maximum time limit (in milliseconds) for query runtime. + discard lbug_connection_set_query_timeout( addr conn.handle, timeout ) + + +func queryInterrupt*( conn: LbugConnection ) = + ## Cancel any running queries. + lbug_connection_interrupt( addr conn.handle ) + diff --git a/src/lbug/constants.nim b/src/lbug/constants.nim new file mode 100644 index 0000000..824c5cd --- /dev/null +++ b/src/lbug/constants.nim @@ -0,0 +1,8 @@ +# vim: set et sta sw=4 ts=4 : + +const LBUG_VERSION* = "0.7.0" +const LBUG_EXPECTED_LIBVERSION* = "0.12.0" +const BLOB_MAXSIZE = 4096 + +let LBUG_DEFAULT_CONFIG* = lbug_default_system_config() + diff --git a/src/kuzu/database.nim b/src/lbug/database.nim similarity index 55% rename from src/kuzu/database.nim rename to src/lbug/database.nim index 20c1e84..524d936 100644 --- a/src/kuzu/database.nim +++ b/src/lbug/database.nim @@ -1,13 +1,13 @@ # vim: set et sta sw=4 ts=4 : -proc `=destroy`*( db: KuzuDatabaseObj ) = +proc `=destroy`*( db: LbugDatabaseObj ) = ## Graceful cleanup for an open DB handle when it goes out of scope. if db.valid: when defined( debug ): echo &"Destroying database: {db}" - kuzu_database_destroy( addr db.handle ) + lbug_database_destroy( addr db.handle ) -proc validateDatabase( db: KuzuDatabase ): void = +proc validateDatabase( db: LbugDatabase ): void = ## Perform basic validity checks against an existing on disk database ## for better error messaging. @@ -21,20 +21,20 @@ proc validateDatabase( db: KuzuDatabase ): void = let magic = buf[0..3].join let storage_version = buf[4].uint - if magic != "KUZU": - raise newException( KuzuException, "Unable to open database: " & - &""""{db.path}" Doesn't appear to be a Kuzu file.""" ) + if magic != "LBUG": + raise newException( LbugException, "Unable to open database: " & + &""""{db.path}" Doesn't appear to be a LadybugDB file.""" ) - if storageVersion != kuzuGetStorageVersion(): - raise newException( KuzuException, "Unable to open database: " & - &" mismatched storage versions - file is {storageVersion}, expected {kuzuGetStorageVersion()}." ) + if storageVersion != lbugGetStorageVersion(): + raise newException( LbugException, "Unable to open database: " & + &" mismatched storage versions - file is {storageVersion}, expected {lbugGetStorageVersion()}." ) -proc newKuzuDatabase*( path="", config=kuzuConfig() ): KuzuDatabase = - ## Create a new Kuzu database handle. Creates an in-memory +proc newlbugDatabase*( path="", config=lbugConfig() ): LbugDatabase = + ## Create a new Lbug database handle. Creates an in-memory ## database by default, but writes to disk if a +path+ is supplied. - result = new KuzuDatabase + result = new LbugDatabase result.config = config if path != "" and path != ":memory:": @@ -44,13 +44,13 @@ proc newKuzuDatabase*( path="", config=kuzuConfig() ): KuzuDatabase = result.path = "(in-memory)" result.kind = memory - result.handle = kuzu_database() + result.handle = lbug_database() if result.kind == disk: result.validateDatabase() - if kuzu_database_init( path, config, addr result.handle ) == KuzuSuccess: + if lbug_database_init( path, config, addr result.handle ) == LbugSuccess: result.valid = true else: - raise newException( KuzuException, "Unable to open database." ) + raise newException( LbugException, "Unable to open database." ) diff --git a/src/lbug/queries.nim b/src/lbug/queries.nim new file mode 100644 index 0000000..b70df06 --- /dev/null +++ b/src/lbug/queries.nim @@ -0,0 +1,197 @@ +# vim: set et sta sw=4 ts=4 : + +proc `=destroy`*( query: LbugQueryResultObj ) = + ## Graceful cleanup for out of scope query objects. + if query.valid: + when defined( debug ): echo &"Destroying query: {query}" + lbug_query_result_destroy( addr query.handle ) + + +# Forward declarations. +func hasNextSet( query: LbugQueryResult ): bool +func getNextSet( query: LbugQueryResult ): LbugQueryResult + + +func getQueryMetadata( query: LbugQueryResult, getAllQueryResults=false ) = + ## Find and retain additional data for the query. + query.num_columns = lbug_query_result_get_num_columns( addr query.handle ) + query.num_tuples = lbug_query_result_get_num_tuples( addr query.handle ) + + # Summary information. + var summary: lbug_query_summary + discard lbug_query_result_get_query_summary( addr query.handle, addr summary ) + query.compile_time = lbug_query_summary_get_compiling_time( addr summary ) + query.execution_time = lbug_query_summary_get_execution_time( addr summary ) + lbug_query_summary_destroy( addr summary ) + + # Pull any additional query results. + query.sets = @[] + if getAllQueryResults: + while query.hasNextSet: + query.sets.add( query.getNextSet ) + + # Column information. + query.column_types = @[] + query.column_names = @[] + if query.num_columns == 0: return + for idx in ( 0 .. query.num_columns-1 ): + + # types + # + var logical_type: lbug_logical_type + discard lbug_query_result_get_column_data_type( + addr query.handle, + idx, + addr logical_type + ) + query.column_types.add( lbug_data_type_get_id( addr logical_type )) + lbug_data_type_destroy( addr logical_type ) + + # names + # + var name: cstring + discard lbug_query_result_get_column_name( + addr query.handle, + idx, + addr name + ) + query.column_names.add( $name ) + lbug_destroy_string( name ) + + +func hasNextSet( query: LbugQueryResult ): bool = + ## Returns +true+ if there are more result sets to be consumed. + result = lbug_query_result_has_next_query_result( addr query.handle ) + + +func getNextSet( query: LbugQueryResult ): LbugQueryResult = + ## Consume and return the next query set result, or raise a LbugIterationError + ## if at the end of sets. + result = new LbugQueryResult + if lbug_query_result_get_next_query_result( addr query.handle, addr result.handle ) == LbugSuccess: + result.valid = true + result.getQueryMetadata() + else: + raise newException( LbugIterationError, &"Query iteration past end of set." ) + + +func query*( conn: LbugConnection, query: string ): LbugQueryResult = + ## Perform a database +query+ and return the result. + result = new LbugQueryResult + + if lbug_connection_query( addr conn.handle, query, addr result.handle ) == LbugSuccess: + result.valid = true + result.getQueryMetadata( getAllQueryResults=true ) + else: + var err = lbug_query_result_get_error_message( addr result.handle ) + raise newException( LbugQueryError, &"Error running query: {err}" ) + + +proc `=destroy`*( prepared: LbugPreparedStatementObj ) = + ## Graceful cleanup for out of scope prepared objects. + if prepared.valid: + when defined( debug ): echo &"Destroying prepared statement: {prepared}" + lbug_prepared_statement_destroy( addr prepared.handle ) + + +func prepare*( conn: LbugConnection, query: string ): LbugPreparedStatement = + ## Return a prepared statement that can avoid planning for repeat calls, + ## with optional variable binding via #execute. + result = new LbugPreparedStatement + if lbug_connection_prepare( addr conn.handle, query, addr result.handle ) == LbugSuccess: + result.conn = conn + result.valid = true + else: + var err = lbug_prepared_statement_get_error_message( addr result.handle ) + raise newException( LbugQueryError, &"Error preparing statement: {err}" ) + + +func bindValue[T]( + stmtHandle: lbug_prepared_statement, + key: cstring, + val: T +) = + ## Bind a key/value to a prepared statement handle. + when typeOf( val ) is bool: + assert( lbug_prepared_statement_bind_bool( addr stmtHandle, key, val ) == LbugSuccess ) + elif typeOf( val ) is int8: + assert( lbug_prepared_statement_bind_int8( addr stmtHandle, key, val ) == LbugSuccess ) + elif typeOf( val ) is int16: + assert( lbug_prepared_statement_bind_int16( addr stmtHandle, key, val ) == LbugSuccess ) + elif typeOf( val ) is int64: + assert( lbug_prepared_statement_bind_int64( addr stmtHandle, key, val ) == LbugSuccess ) + elif typeOf( val ) is int or typeOf( val ) is int32: + assert( lbug_prepared_statement_bind_int32( addr stmtHandle, key, val.int32 ) == LbugSuccess ) + elif typeOf( val ) is uint8: + assert( lbug_prepared_statement_bind_uint8( addr stmtHandle, key, val ) == LbugSuccess ) + elif typeOf( val ) is uint16: + assert( lbug_prepared_statement_bind_uint16( addr stmtHandle, key, val ) == LbugSuccess ) + elif typeOf( val ) is uint64: + assert( lbug_prepared_statement_bind_uint64( addr stmtHandle, key, val ) == LbugSuccess ) + elif typeOf( val ) is uint or typeOf( val ) is uint32: + assert( lbug_prepared_statement_bind_uint32( addr stmtHandle, key, val.uint32 ) == LbugSuccess ) + elif typeOf( val ) is float: + assert( lbug_prepared_statement_bind_double( addr stmtHandle, key, val ) == LbugSuccess ) + elif typeOf( val ) is string: + # Fallback to string. For custom types, just cast in the cypher query. + assert( lbug_prepared_statement_bind_string( addr stmtHandle, key, val.cstring ) == LbugSuccess ) + else: + raise newException( LbugTypeError, &"""Unsupported type {$typeOf(val)} for prepared statement.""" ) + + +proc execute*( + prepared: LbugPreparedStatement, + params: tuple = () +): LbugQueryResult = + ## Bind variables in *params* to the statement, and return + ## a LbugQueryResult. + + result = new LbugQueryResult + + for key, val in params.fieldPairs: + prepared.handle.bindValue( key, val ) + + if lbug_connection_execute( + addr prepared.conn.handle, + addr prepared.handle, + addr result.handle + ) == LbugSuccess: + result.valid = false + result.getQueryMetadata() + else: + var err = lbug_query_result_get_error_message( addr result.handle ) + raise newException( LbugQueryError, &"Error executing prepared statement: {err}" ) + + +func `$`*( query: LbugQueryResult ): string = + ## Return the entire result set as a string. + result = $lbug_query_result_to_string( addr query.handle ) + + +func hasNext*( query: LbugQueryResult ): bool = + ## Returns +true+ if there are more tuples to be consumed. + result = lbug_query_result_has_next( addr query.handle ) + + +func getNext*( query: LbugQueryResult ): LbugFlatTuple = + ## Consume and return the next tuple result, or raise a LbugIterationError + ## if at the end of the result tuples. + result = new LbugFlatTuple + if lbug_query_result_get_next( addr query.handle, addr result.handle ) == LbugSuccess: + result.valid = true + result.num_columns = query.num_columns + else: + raise newException( LbugIterationError, &"Query iteration past end of tuples." ) + + +func rewind*( query: LbugQueryResult ) = + ## Reset query iteration back to the beginning. + lbug_query_result_reset_iterator( addr query.handle ) + + +iterator items*( query: LbugQueryResult ): LbugFlatTuple = + ## Iterate available tuples, yielding to the block. + while query.hasNext: + yield query.getNext + query.rewind + diff --git a/src/lbug/tuple.nim b/src/lbug/tuple.nim new file mode 100644 index 0000000..58cdb79 --- /dev/null +++ b/src/lbug/tuple.nim @@ -0,0 +1,30 @@ +# vim: set et sta sw=4 ts=4 : + +# NOTE: Constructor in queries.nim, #getNext + +proc `=destroy`*( tpl: LbugFlatTupleObj ) = + ## Graceful cleanup for out of scope tuples. + if tpl.valid: + when defined( debug ): echo &"Destroying tuple: {tpl}" + lbug_flat_tuple_destroy( addr tpl.handle ) + + +func `$`*( tpl: LbugFlatTuple ): string = + ## Stringify a tuple. + result = $lbug_flat_tuple_to_string( addr tpl.handle ) + result.removeSuffix( "\n" ) + + +func `[]`*( tpl: LbugFlatTuple, idx: int|uint64 ): LbugValue = + ## Returns a LbugValue at the given *idx*. + + result = new LbugValue + + if lbug_flat_tuple_get_value( addr tpl.handle, idx.uint64, addr result.handle ) == LbugSuccess: + result.valid = true + result.getType() + else: + raise newException( LbugIndexError, + &"Unable to fetch tuple value at idx {idx}. ({tpl.num_columns} column(s).)" ) + + diff --git a/src/lbug/types.nim b/src/lbug/types.nim new file mode 100644 index 0000000..40ee3ea --- /dev/null +++ b/src/lbug/types.nim @@ -0,0 +1,61 @@ +# vim: set et sta sw=4 ts=4 : + +type + LbugDBType* = enum + disk, memory + + LbugDatabaseObj = object + handle: lbug_database + path*: string + kind*: LbugDBType + config*: lbug_system_config + valid = false + LbugDatabase* = ref LbugDatabaseObj + + LbugConnectionObj = object + handle: lbug_connection + valid = false + LbugConnection* = ref LbugConnectionObj + + LbugQueryResultObj = object + handle: lbug_query_result + num_columns*: uint64 = 0 + num_tuples*: uint64 = 0 + compile_time*: cdouble = 0 + execution_time*: cdouble = 0 + column_types*: seq[ lbug_data_type_id ] + column_names*: seq[ string ] + sets*: seq[ LbugQueryResult ] + valid = false + LbugQueryResult* = ref LbugQueryResultObj + + LbugPreparedStatementObj = object + handle: lbug_prepared_statement + conn: LbugConnection + valid = false + LbugPreparedStatement* = ref LbugPreparedStatementObj + + LbugFlatTupleObj = object + handle: lbug_flat_tuple + num_columns: uint64 = 0 + valid = false + LbugFlatTuple* = ref LbugFlatTupleObj + + LbugValueObj = object + handle: lbug_value + valid = false + kind*: lbug_data_type_id + LbugValue* = ref LbugValueObj + + LbugStructValueObj = object + value: LbugValue + len*: uint64 + keys*: seq[ string ] + LbugStructValue* = ref LbugStructValueObj + + LbugException* = object of CatchableError + LbugQueryError* = object of LbugException + LbugIndexError* = object of LbugException + LbugIterationError* = object of LbugException + LbugTypeError* = object of LbugException + diff --git a/src/lbug/value.nim b/src/lbug/value.nim new file mode 100644 index 0000000..b66f4ea --- /dev/null +++ b/src/lbug/value.nim @@ -0,0 +1,197 @@ +# vim: set et sta sw=4 ts=4 : + +# NOTE: Constructor in tuples.nim, #[] + +proc `=destroy`*( value: LbugValueObj ) = + ## Graceful cleanup for out of scope values. + if value.valid: + when defined( debug ): echo &"Destroying value: {value}" + lbug_value_destroy( addr value.handle ) + + +func getType( value: LbugValue ) = + ## Find and set the native Lbug type of this value. + var logical_type: lbug_logical_type + lbug_value_get_data_type( addr value.handle, addr logical_type ) + value.kind = lbug_data_type_get_id( addr logical_type ) + lbug_data_type_destroy( addr logical_type ) + + +template checkType( kind: lbug_data_type_id, valid_types: set ) = + ## Raises a LbugTypeError if the type conversion is incompatible. + if kind notin valid_types: + let msg = "Mismatched types: " & $kind & " != " & $valid_types + raise newException( LbugTypeError, msg ) + + +func `$`*( value: LbugValue ): string = + ## Stringify a value. + result = $lbug_value_to_string( addr value.handle ) + + +func toBool*( value: LbugValue ): bool = + ## Conversion from Lbug type to Nim. + checkType( value.kind, {LBUG_BOOL} ) + assert( lbug_value_get_bool( addr value.handle, addr result ) == LbugSuccess ) + + +func toInt8*( value: LbugValue ): int8 = + ## Conversion from Lbug type to Nim. + checkType( value.kind, {LBUG_INT8} ) + assert( lbug_value_get_int8( addr value.handle, addr result ) == LbugSuccess ) + + +func toInt16*( value: LbugValue ): int16 = + ## Conversion from Lbug type to Nim. + checkType( value.kind, {LBUG_INT16} ) + assert( lbug_value_get_int16( addr value.handle, addr result ) == LbugSuccess ) + + +func toInt32*( value: LbugValue ): int32 = + ## Conversion from Lbug type to Nim. + checkType( value.kind, {LBUG_INT32} ) + assert( lbug_value_get_int32( addr value.handle, addr result ) == LbugSuccess ) + + +func toInt64*( value: LbugValue ): int64 = + ## Conversion from Lbug type to Nim. + checkType( value.kind, {LBUG_INT64} ) + assert( lbug_value_get_int64( addr value.handle, addr result ) == LbugSuccess ) + + +func toUint8*( value: LbugValue ): uint8 = + ## Conversion from Lbug type to Nim. + checkType( value.kind, {LBUG_UINT8} ) + assert( lbug_value_get_uint8( addr value.handle, addr result ) == LbugSuccess ) + + +func toUint16*( value: LbugValue ): uint16 = + ## Conversion from Lbug type to Nim. + checkType( value.kind, {LBUG_UINT16} ) + assert( lbug_value_get_uint16( addr value.handle, addr result ) == LbugSuccess ) + + +func toUint32*( value: LbugValue ): uint32 = + ## Conversion from Lbug type to Nim. + checkType( value.kind, {LBUG_UINT32} ) + assert( lbug_value_get_uint32( addr value.handle, addr result ) == LbugSuccess ) + + +func toUint64*( value: LbugValue ): uint64 = + ## Conversion from Lbug type to Nim. + checkType( value.kind, {LBUG_UINT64} ) + assert( lbug_value_get_uint64( addr value.handle, addr result ) == LbugSuccess ) + + +func toDouble*( value: LbugValue ): float = + ## Conversion from Lbug type to Nim. + checkType( value.kind, {LBUG_DOUBLE} ) + assert( lbug_value_get_double( addr value.handle, addr result ) == LbugSuccess ) + + +func toFloat*( value: LbugValue ): float = + ## Conversion from Lbug type to Nim. + checkType( value.kind, {LBUG_FLOAT} ) + var rv: cfloat + assert( lbug_value_get_float( addr value.handle, addr rv ) == LbugSuccess ) + result = rv + + +func toTimestamp*( value: LbugValue ): int = + ## Conversion from Lbug type to Nim. + checkType( value.kind, {LBUG_TIMESTAMP} ) + var rv: lbug_timestamp_t + assert( lbug_value_get_timestamp( addr value.handle, addr rv ) == LbugSuccess ) + result = rv.value + + +func toList*( value: LbugValue ): seq[ LbugValue ] = + ## Return a sequence from LBUG_LIST values. + checkType( value.kind, {LBUG_LIST} ) + result = @[] + var size: uint64 + assert( lbug_value_get_list_size( addr value.handle, addr size ) == LbugSuccess ) + if size == 0: return + + for i in ( 0 .. size-1 ): + var kval = new LbugValue + assert( + lbug_value_get_list_element( + addr value.handle, i.uint64, addr kval.handle + ) == LbugSuccess ) + kval.getType() + result.add( kval ) + +const toSeq* = toList + + +func toBlob*( value: LbugValue ): seq[ byte ] = + ## Conversion from Lbug type to Nim - returns a BLOB as a sequence of bytes. + checkType( value.kind, {LBUG_BLOB} ) + + result = @[] + var data: ptr byte + assert( lbug_value_get_blob( addr value.handle, addr data ) == LbugSuccess ) + + for idx in 0 .. BLOB_MAXSIZE: + var byte = cast[ptr byte](cast[uint](data) + idx.uint)[] + if byte == 0: break + result.add( byte ) + + lbug_destroy_blob( data ) + + +func toStruct*( value: LbugValue ): LbugStructValue = + ## Create a convenience class for struct-like LbugValues. + checkType( value.kind, { + LBUG_STRUCT, + LBUG_NODE, + LBUG_REL, + LBUG_RECURSIVE_REL, + LBUG_UNION + }) + result = new LbugStructValue + result.value = value + + discard lbug_value_get_struct_num_fields( addr value.handle, addr result.len ) + if result.len == 0: return + + # Build keys + for idx in ( 0 .. result.len - 1 ): + var keyname: cstring + assert( + lbug_value_get_struct_field_name( + addr value.handle, idx.uint64, addr keyname + ) == LbugSuccess ) + result.keys.add( $keyname ) + +const toNode* = toStruct +const toRel* = toStruct + + +func `[]`*( struct: LbugStructValue, key: string ): LbugValue = + ## Return a LbugValue for the struct *key*. + var idx: uint64 + var found = false + for i in ( 0 .. struct.len-1 ): + if struct.keys[i] == key: + found = true + idx = i + break + if not found: + raise newException( LbugIndexError, + &"""No such struct key "{key}".""" ) + + result = new LbugValue + assert( + lbug_value_get_struct_field_value( + addr struct.value.handle, idx.uint64, addr result.handle + ) == LbugSuccess ) + result.getType() + + +func `$`*( struct: LbugStructValue ): string = + ## Stringify a struct value. + result = $lbug_value_to_string( addr struct.value.handle ) + + diff --git a/tests/connection/t_can_create_new_connection.nim b/tests/connection/t_can_create_new_connection.nim index b52a2bc..135dc36 100644 --- a/tests/connection/t_can_create_new_connection.nim +++ b/tests/connection/t_can_create_new_connection.nim @@ -1,10 +1,10 @@ # vim: set et sta sw=4 ts=4 : -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() assert db.path == "(in-memory)" -assert typeOf( db.connect ) is KuzuConnection +assert typeOf( db.connect ) is LbugConnection diff --git a/tests/connection/t_can_interrupt_running_query.nim b/tests/connection/t_can_interrupt_running_query.nim index 6e3e453..d89f4a7 100644 --- a/tests/connection/t_can_interrupt_running_query.nim +++ b/tests/connection/t_can_interrupt_running_query.nim @@ -1,9 +1,9 @@ # vim: set et sta sw=4 ts=4 : -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect # FIXME: This test should really perform some diff --git a/tests/connection/t_can_set_connection_query_timeout.nim b/tests/connection/t_can_set_connection_query_timeout.nim index 256d7a9..9e6f98d 100644 --- a/tests/connection/t_can_set_connection_query_timeout.nim +++ b/tests/connection/t_can_set_connection_query_timeout.nim @@ -1,8 +1,8 @@ # vim: set et sta sw=4 ts=4 : -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect # There is currently no getter for this, so diff --git a/tests/constants/t_has_a_default_config.nim b/tests/constants/t_has_a_default_config.nim index db19f43..085acc4 100644 --- a/tests/constants/t_has_a_default_config.nim +++ b/tests/constants/t_has_a_default_config.nim @@ -1,6 +1,6 @@ # vim: set et sta sw=4 ts=4 : -import kuzu +import lbug -assert typeOf( KUZU_DEFAULT_CONFIG ) is kuzu_system_config +assert typeOf( LBUG_DEFAULT_CONFIG ) is lbug_system_config diff --git a/tests/constants/t_has_a_version.nim b/tests/constants/t_has_a_version.nim index 7bb5f52..01c4c7b 100644 --- a/tests/constants/t_has_a_version.nim +++ b/tests/constants/t_has_a_version.nim @@ -1,7 +1,7 @@ # vim: set et sta sw=4 ts=4 : import re -import kuzu +import lbug -assert KUZU_VERSION.contains( re"^\d+\.\d+\.\d+$" ) +assert LBUG_VERSION.contains( re"^\d+\.\d+\.\d+$" ) diff --git a/tests/constants/t_knows_its_libversion.nim b/tests/constants/t_knows_its_libversion.nim index 0726687..97d2aab 100644 --- a/tests/constants/t_knows_its_libversion.nim +++ b/tests/constants/t_knows_its_libversion.nim @@ -1,8 +1,8 @@ # vim: set et sta sw=4 ts=4 : import re -import kuzu +import lbug -let version = $kuzuGetVersion() +let version = $lbugGetVersion() assert version.contains( re"^\d+\.\d+\.\d+(?:\.\d+)?$" ) diff --git a/tests/constants/t_knows_its_storage_version.nim b/tests/constants/t_knows_its_storage_version.nim index 012325b..13aaca0 100644 --- a/tests/constants/t_knows_its_storage_version.nim +++ b/tests/constants/t_knows_its_storage_version.nim @@ -1,6 +1,6 @@ # vim: set et sta sw=4 ts=4 : -import kuzu +import lbug -assert kuzuGetStorageVersion() >= 36 +assert lbugGetStorageVersion() >= 36 diff --git a/tests/database/t_can_create_in_memory.nim b/tests/database/t_can_create_in_memory.nim index 08333c3..82bef1f 100644 --- a/tests/database/t_can_create_in_memory.nim +++ b/tests/database/t_can_create_in_memory.nim @@ -1,8 +1,8 @@ # vim: set et sta sw=4 ts=4 : -import kuzu +import lbug -var db = newKuzuDatabase() +var db = newLbugDatabase() assert db.path == "(in-memory)" assert db.kind == memory diff --git a/tests/database/t_can_create_with_custom_config.nim b/tests/database/t_can_create_with_custom_config.nim index c878cc1..fa84f2a 100644 --- a/tests/database/t_can_create_with_custom_config.nim +++ b/tests/database/t_can_create_with_custom_config.nim @@ -4,12 +4,12 @@ import std/files, std/paths -import kuzu +import lbug const DATABASE_PATH = Path( "tmp/testdb" ) DATABASE_PATH.removeFile() -var db = newKuzuDatabase( $DATABASE_PATH, kuzuConfig( auto_checkpoint=false ) ) +var db = newLbugDatabase( $DATABASE_PATH, lbugConfig( auto_checkpoint=false ) ) assert db.path == "tmp/testdb" assert db.config.auto_checkpoint == false diff --git a/tests/database/t_checks_for_valid_kuzu_file.nim b/tests/database/t_checks_for_valid_kuzu_file.nim index dd7eb95..1de7b4c 100644 --- a/tests/database/t_checks_for_valid_kuzu_file.nim +++ b/tests/database/t_checks_for_valid_kuzu_file.nim @@ -5,7 +5,7 @@ import std/paths, std/re -import kuzu +import lbug const NOT_A_DATABASE_PATH = Path( "tmp/not-a-db" ) @@ -15,9 +15,9 @@ fh.write( "Hi." ) fh.close try: - discard newKuzuDatabase( $NOT_A_DATABASE_PATH ) -except KuzuException as err: - assert err.msg.contains( re"""Unable to open database: "tmp/not-a-db" Doesn't appear to be a Kuzu file""" ) + discard newLbugDatabase( $NOT_A_DATABASE_PATH ) +except LbugException as err: + assert err.msg.contains( re"""Unable to open database: "tmp/not-a-db" Doesn't appear to be a LadybugDB file""" ) NOT_A_DATABASE_PATH.removeFile() diff --git a/tests/database/t_creates_with_default_config.nim b/tests/database/t_creates_with_default_config.nim index 3e8cafb..a6e4d44 100644 --- a/tests/database/t_creates_with_default_config.nim +++ b/tests/database/t_creates_with_default_config.nim @@ -4,16 +4,16 @@ import std/files, std/paths -import kuzu +import lbug const DATABASE_PATH = Path( "tmp/testdb" ) DATABASE_PATH.removeFile() -var db = newKuzuDatabase( $DATABASE_PATH ) +var db = newLbugDatabase( $DATABASE_PATH ) assert db.path == $DATABASE_PATH assert db.kind == disk -assert db.config == kuzuConfig() +assert db.config == lbugConfig() assert db.config.read_only == false DATABASE_PATH.removeFile() diff --git a/tests/queries/t_auto_rewinds_the_iterator.nim b/tests/queries/t_auto_rewinds_the_iterator.nim index 6bca303..e26b5d7 100644 --- a/tests/queries/t_auto_rewinds_the_iterator.nim +++ b/tests/queries/t_auto_rewinds_the_iterator.nim @@ -1,8 +1,8 @@ # vim: set et sta sw=4 ts=4 : -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query """ diff --git a/tests/queries/t_can_bind_to_a_prepared_statement.nim b/tests/queries/t_can_bind_to_a_prepared_statement.nim index d5e17b9..e063724 100644 --- a/tests/queries/t_can_bind_to_a_prepared_statement.nim +++ b/tests/queries/t_can_bind_to_a_prepared_statement.nim @@ -4,19 +4,19 @@ discard """ output: "d.thing\nCamel\nLampshade\nDelicious Cake\n" """ -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( "CREATE NODE TABLE Doop ( id SERIAL, thing STRING, PRIMARY KEY(id) )" ) var p = conn.prepare( "CREATE (d:Doop {thing: $thing})" ) -assert typeOf( p ) is KuzuPreparedStatement +assert typeOf( p ) is LbugPreparedStatement for thing in @[ "Camel", "Lampshade", "Delicious Cake" ]: q = p.execute( (thing: thing) ) - assert typeOf( q ) is KuzuQueryResult + assert typeOf( q ) is LbugQueryResult # Fixed post v0.8.2: # https://github.com/kuzudb/kuzu/issues/5102 diff --git a/tests/queries/t_can_bind_various_datatypes.nim b/tests/queries/t_can_bind_various_datatypes.nim index 9a3780c..16db77a 100644 --- a/tests/queries/t_can_bind_various_datatypes.nim +++ b/tests/queries/t_can_bind_various_datatypes.nim @@ -4,9 +4,9 @@ discard """ output: "0|-222222|128|True|Stuff!|3.344903|239.299923|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11|2025-03-29" """ -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( """CREATE NODE TABLE Doop ( @@ -21,7 +21,7 @@ var q = conn.query( """CREATE NODE TABLE Doop ( date DATE, PRIMARY KEY(id) )""" ) -assert typeOf( q ) is KuzuQueryResult +assert typeOf( q ) is LbugQueryResult var stmt = conn.prepare( """CREATE (d:Doop { @@ -34,7 +34,7 @@ var stmt = conn.prepare( """CREATE (d:Doop { uuid: UUID($uuid), date: DATE($date) })""" ) -assert typeOf( stmt ) is KuzuPreparedStatement +assert typeOf( stmt ) is LbugPreparedStatement q = stmt.execute(( @@ -47,7 +47,7 @@ q = stmt.execute(( uuid: "A0EEBC99-9C0B-4EF8-BB6D-6BB9BD380A11", date: "2025-03-29" )) -assert typeOf( q ) is KuzuQueryResult +assert typeOf( q ) is LbugQueryResult q = conn.query( "MATCH (d:Doop) RETURN d.*" ) diff --git a/tests/queries/t_can_contain_multiple_result_sets.nim b/tests/queries/t_can_contain_multiple_result_sets.nim index 534f871..b9b312f 100644 --- a/tests/queries/t_can_contain_multiple_result_sets.nim +++ b/tests/queries/t_can_contain_multiple_result_sets.nim @@ -4,14 +4,14 @@ discard """ output: "a\nb\nc\nd\ne\nf\n" """ -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( "RETURN 'hi'" ) -assert typeOf( q ) is KuzuQueryResult +assert typeOf( q ) is LbugQueryResult assert q.sets.len == 0 q = conn.query """ @@ -23,7 +23,7 @@ q = conn.query """ RETURN "f"; """ -assert typeOf( q ) is KuzuQueryResult +assert typeOf( q ) is LbugQueryResult assert q.sets.len == 5 echo q.getNext diff --git a/tests/queries/t_can_execute_a_simple_queries.nim b/tests/queries/t_can_execute_a_simple_queries.nim index 35edd0e..fd86f04 100644 --- a/tests/queries/t_can_execute_a_simple_queries.nim +++ b/tests/queries/t_can_execute_a_simple_queries.nim @@ -1,16 +1,16 @@ # vim: set et sta sw=4 ts=4 : -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( "CREATE NODE TABLE Doop ( id SERIAL, thing STRING, PRIMARY KEY(id) )" ) -assert typeOf( q ) is KuzuQueryResult +assert typeOf( q ) is LbugQueryResult for thing in @[ "Camel", "Lampshade", "Delicious Cake" ]: q = conn.query( "CREATE (d:Doop {thing: '" & thing & "'})" ) - assert typeOf( q ) is KuzuQueryResult + assert typeOf( q ) is LbugQueryResult q = conn.query( "MATCH (d:Doop) RETURN d.thing" ) assert q.num_columns == 1 diff --git a/tests/queries/t_can_iterate_tuples.nim b/tests/queries/t_can_iterate_tuples.nim index e4fb45f..2dd7971 100644 --- a/tests/queries/t_can_iterate_tuples.nim +++ b/tests/queries/t_can_iterate_tuples.nim @@ -4,9 +4,9 @@ discard """ output: "Camel\nLampshade\nDelicious Cake\n" """ -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( "CREATE NODE TABLE Doop ( id SERIAL, thing STRING, PRIMARY KEY(id) )" ) diff --git a/tests/queries/t_can_rewind_iteration.nim b/tests/queries/t_can_rewind_iteration.nim index b22b1a5..d2dbc71 100644 --- a/tests/queries/t_can_rewind_iteration.nim +++ b/tests/queries/t_can_rewind_iteration.nim @@ -4,9 +4,9 @@ discard """ output: "Camel\nLampshade\nCamel\nLampshade\n" """ -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( "CREATE NODE TABLE Doop ( id SERIAL, thing STRING, PRIMARY KEY(id) )" ) diff --git a/tests/queries/t_can_stringify_results.nim b/tests/queries/t_can_stringify_results.nim index eea07f6..e27d0f6 100644 --- a/tests/queries/t_can_stringify_results.nim +++ b/tests/queries/t_can_stringify_results.nim @@ -4,9 +4,9 @@ discard """ output: "d.thing\nokay!\n\n" """ -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( "CREATE NODE TABLE Doop ( id SERIAL, thing STRING, PRIMARY KEY(id) )" ) diff --git a/tests/queries/t_knows_if_there_are_waiting_tuples.nim b/tests/queries/t_knows_if_there_are_waiting_tuples.nim index 5cfdc07..2c6da18 100644 --- a/tests/queries/t_knows_if_there_are_waiting_tuples.nim +++ b/tests/queries/t_knows_if_there_are_waiting_tuples.nim @@ -1,12 +1,12 @@ # vim: set et sta sw=4 ts=4 : -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( "CREATE NODE TABLE Doop ( id SERIAL, thing STRING, PRIMARY KEY(id) )" ) -assert typeOf( q ) is KuzuQueryResult +assert typeOf( q ) is LbugQueryResult q = conn.query( "MATCH (d:Doop) RETURN d.thing" ) assert q.num_tuples == 0 diff --git a/tests/queries/t_knows_the_column_names.nim b/tests/queries/t_knows_the_column_names.nim index ab41d60..28625b1 100644 --- a/tests/queries/t_knows_the_column_names.nim +++ b/tests/queries/t_knows_the_column_names.nim @@ -1,12 +1,12 @@ # vim: set et sta sw=4 ts=4 : -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( "CREATE NODE TABLE Doop ( id SERIAL, thing STRING, PRIMARY KEY(id) )" ) -assert typeOf( q ) is KuzuQueryResult +assert typeOf( q ) is LbugQueryResult q = conn.query( "CREATE (d:Doop {thing: 'okay!'})" ) q = conn.query( "MATCH (d:Doop) RETURN d.id AS IDENTIFIER, d.thing AS THING" ) diff --git a/tests/queries/t_knows_the_column_types.nim b/tests/queries/t_knows_the_column_types.nim index c972f28..56782db 100644 --- a/tests/queries/t_knows_the_column_types.nim +++ b/tests/queries/t_knows_the_column_types.nim @@ -1,17 +1,17 @@ # vim: set et sta sw=4 ts=4 : -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( "CREATE NODE TABLE Doop ( id SERIAL, thing STRING, PRIMARY KEY(id) )" ) -assert typeOf( q ) is KuzuQueryResult +assert typeOf( q ) is LbugQueryResult q = conn.query( "CREATE (d:Doop {thing: 'okay!'})" ) q = conn.query( "MATCH (d:Doop) RETURN d.id AS IDENTIFIER, d.thing AS THING" ) assert q.column_types.len == 2 -assert $q.column_types[0] == "KUZU_SERIAL" -assert $q.column_types[1] == "KUZU_STRING" +assert $q.column_types[0] == "LBUG_SERIAL" +assert $q.column_types[1] == "LBUG_STRING" diff --git a/tests/queries/t_raises_on_bad_syntax.nim b/tests/queries/t_raises_on_bad_syntax.nim index 5b8b15a..b5895d6 100644 --- a/tests/queries/t_raises_on_bad_syntax.nim +++ b/tests/queries/t_raises_on_bad_syntax.nim @@ -2,13 +2,13 @@ import std/re -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect try: discard conn.query( "NOPE NOPE NOPE" ) -except KuzuQueryError as err: +except LbugQueryError as err: assert err.msg.contains( re"""Parser exception: extraneous input 'NOPE'""" ) diff --git a/tests/queries/t_raises_on_invalid_varbind.nim b/tests/queries/t_raises_on_invalid_varbind.nim index 682308a..424e98b 100644 --- a/tests/queries/t_raises_on_invalid_varbind.nim +++ b/tests/queries/t_raises_on_invalid_varbind.nim @@ -2,30 +2,30 @@ import std/re -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( "CREATE NODE TABLE Doop ( id SERIAL, created DATE, PRIMARY KEY(id) )" ) -assert typeOf( q ) is KuzuQueryResult +assert typeOf( q ) is LbugQueryResult var p = conn.prepare( "CREATE (d:Doop {created: $created})" ) -assert typeOf( p ) is KuzuPreparedStatement +assert typeOf( p ) is LbugPreparedStatement # Typecast binding failure # try: discard p.execute( (created: "1111-1111") ) -except KuzuQueryError as err: - assert err.msg.contains( re"""Expression \$created has data type STRING but expected DATE.""" ) +except LbugQueryError as err: + assert err.msg.contains( re"""Conversion exception: Error occurred during parsing date.""" ) # Invalid value for typecast # p = conn.prepare( "CREATE (d:Doop {created: DATE($created)})" ) try: discard p.execute( (created: "1111-1111") ) -except KuzuQueryError as err: +except LbugQueryError as err: assert err.msg.contains( re"""Given: "1111-1111". Expected format: \(YYYY-MM-DD\)""" ) diff --git a/tests/queries/t_raises_on_unknown_varbind.nim b/tests/queries/t_raises_on_unknown_varbind.nim index bebe094..5952e62 100644 --- a/tests/queries/t_raises_on_unknown_varbind.nim +++ b/tests/queries/t_raises_on_unknown_varbind.nim @@ -2,19 +2,19 @@ import std/re -import kuzu +import ladybug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( "CREATE NODE TABLE Doop ( id SERIAL, thing STRING, PRIMARY KEY(id) )" ) var p = conn.prepare( "CREATE (d:Doop {thing: $thing})" ) -assert typeOf( p ) is KuzuPreparedStatement +assert typeOf( p ) is LbugPreparedStatement try: - discard p.execute( (nope: "undefined var in statement!") ) -except KuzuQueryError as err: + discard p.execute( (nope: "undefined var in statement!", thing: "yep") ) +except LbugQueryError as err: assert err.msg.contains( re"""Parameter nope not found.""" ) diff --git a/tests/queries/t_raises_with_invalid_prepared_statement.nim b/tests/queries/t_raises_with_invalid_prepared_statement.nim index 8a241ac..5e16e54 100644 --- a/tests/queries/t_raises_with_invalid_prepared_statement.nim +++ b/tests/queries/t_raises_with_invalid_prepared_statement.nim @@ -2,19 +2,19 @@ import std/re -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( "CREATE NODE TABLE Doop ( id SERIAL, thing STRING, PRIMARY KEY(id) )" ) var p = conn.prepare( "CREAET (d:Doop {thing: $thing})" ) -assert typeOf( p ) is KuzuPreparedStatement +assert typeOf( p ) is LbugPreparedStatement try: discard p.execute -except KuzuQueryError as err: +except LbugQueryError as err: assert err.msg.contains( re"""Parser exception: extraneous input 'CREAET'""" ) diff --git a/tests/tuples/t_can_be_stringified.nim b/tests/tuples/t_can_be_stringified.nim index e255b6d..231dd85 100644 --- a/tests/tuples/t_can_be_stringified.nim +++ b/tests/tuples/t_can_be_stringified.nim @@ -4,9 +4,9 @@ discard """ output: "okay!" """ -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( "CREATE NODE TABLE Doop ( id SERIAL, thing STRING, PRIMARY KEY(id) )" ) diff --git a/tests/tuples/t_throws_exception_fetching_at_end.nim b/tests/tuples/t_throws_exception_fetching_at_end.nim index 2aa4b10..dafed07 100644 --- a/tests/tuples/t_throws_exception_fetching_at_end.nim +++ b/tests/tuples/t_throws_exception_fetching_at_end.nim @@ -2,9 +2,9 @@ import std/re -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( "CREATE NODE TABLE Doop ( id SERIAL, thing STRING, PRIMARY KEY(id) )" ) @@ -12,6 +12,6 @@ q = conn.query( "MATCH (d:Doop) RETURN d.thing" ) try: discard q.getNext -except KuzuIterationError as err: +except LbugIterationError as err: assert err.msg.contains( re"""Query iteration past end.""" ) diff --git a/tests/tuples/t_throws_exception_invalid_index.nim b/tests/tuples/t_throws_exception_invalid_index.nim index 6038f0c..afa06dc 100644 --- a/tests/tuples/t_throws_exception_invalid_index.nim +++ b/tests/tuples/t_throws_exception_invalid_index.nim @@ -2,9 +2,9 @@ import std/re -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( "CREATE NODE TABLE Doop ( id SERIAL, thing STRING, PRIMARY KEY(id) )" ) @@ -15,6 +15,6 @@ let tup = q.getNext try: echo tup[22] -except KuzuIndexError as err: +except LbugIndexError as err: assert err.msg.contains( re"""Unable to fetch tuple value at idx 22.""" ) diff --git a/tests/values/t_can_be_stringified.nim b/tests/values/t_can_be_stringified.nim index d14ad69..53899b3 100644 --- a/tests/values/t_can_be_stringified.nim +++ b/tests/values/t_can_be_stringified.nim @@ -4,9 +4,9 @@ discard """ output: "okay!" """ -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( "CREATE NODE TABLE Doop ( id SERIAL, thing STRING, PRIMARY KEY(id) )" ) diff --git a/tests/values/t_can_convert_to_native_types.nim b/tests/values/t_can_convert_to_native_types.nim index b8c0c6b..c00af44 100644 --- a/tests/values/t_can_convert_to_native_types.nim +++ b/tests/values/t_can_convert_to_native_types.nim @@ -1,8 +1,8 @@ # vim: set et sta sw=4 ts=4 : -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( """CREATE NODE TABLE Doop ( diff --git a/tests/values/t_can_return_a_blob_object.nim b/tests/values/t_can_return_a_blob_object.nim index 4b3ee81..fbe4665 100644 --- a/tests/values/t_can_return_a_blob_object.nim +++ b/tests/values/t_can_return_a_blob_object.nim @@ -1,8 +1,8 @@ # vim: set et sta sw=4 ts=4 : -import kuzu +import lbug -var db = newKuzuDatabase() +var db = newLbugDatabase() var conn = db.connect var q = conn.query( "CREATE NODE TABLE Doot ( id SERIAL, data BLOB, PRIMARY KEY(id) )" ) @@ -16,12 +16,12 @@ q = conn.query( "MATCH (d:Doot) RETURN d.data" ) var expected: seq[byte] = @[188, 189, 186, 170] var val = q.getNext[0] -assert val.kind == KUZU_BLOB +assert val.kind == LBUG_BLOB assert val.toBlob == expected expected = @[72, 101, 108, 108, 111, 33] val = q.getNext[0] -assert val.kind == KUZU_BLOB +assert val.kind == LBUG_BLOB assert val.toBlob == expected var str: string diff --git a/tests/values/t_can_return_a_list_object.nim b/tests/values/t_can_return_a_list_object.nim index db32e63..f2f237b 100644 --- a/tests/values/t_can_return_a_list_object.nim +++ b/tests/values/t_can_return_a_list_object.nim @@ -1,39 +1,39 @@ # vim: set et sta sw=4 ts=4 : -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( "RETURN [1,2,3,4,5] AS list" ) var list = q.getNext[0] -assert list.kind == KUZU_LIST +assert list.kind == LBUG_LIST var items = list.toSeq assert items.len == 5 -assert typeOf( items ) is seq[KuzuValue] +assert typeOf( items ) is seq[LbugValue] for i in items: - assert( i.kind == KUZU_INT64 ) + assert( i.kind == LBUG_INT64 ) q = conn.query( """RETURN ["woo", "hoo"] AS list""" ) list = q.getNext[0] -assert list.kind == KUZU_LIST +assert list.kind == LBUG_LIST items = list.toSeq assert items.len == 2 -assert typeOf( items ) is seq[KuzuValue] +assert typeOf( items ) is seq[LbugValue] for i in items: - assert( i.kind == KUZU_STRING ) + assert( i.kind == LBUG_STRING ) q = conn.query( """RETURN [] AS list""" ) list = q.getNext[0] -assert list.kind == KUZU_LIST +assert list.kind == LBUG_LIST items = list.toList assert items.len == 0 -assert typeOf( items ) is seq[KuzuValue] +assert typeOf( items ) is seq[LbugValue] diff --git a/tests/values/t_can_return_a_struct_object.nim b/tests/values/t_can_return_a_struct_object.nim index c8361f1..109f554 100644 --- a/tests/values/t_can_return_a_struct_object.nim +++ b/tests/values/t_can_return_a_struct_object.nim @@ -1,14 +1,14 @@ # vim: set et sta sw=4 ts=4 : -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( """RETURN 12""" ) try: discard q.getNext[0].toStruct -except KuzuTypeError: +except LbugTypeError: discard diff --git a/tests/values/t_can_return_a_type.nim b/tests/values/t_can_return_a_type.nim index 3e8a788..6d80452 100644 --- a/tests/values/t_can_return_a_type.nim +++ b/tests/values/t_can_return_a_type.nim @@ -1,8 +1,8 @@ # vim: set et sta sw=4 ts=4 : -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( "CREATE NODE TABLE Doop ( id SERIAL, thing STRING, PRIMARY KEY(id) )" ) @@ -15,7 +15,7 @@ var id = row[0] var thing = row[1] var node = row[2] -assert id.kind == KUZU_INT64 -assert thing.kind == KUZU_STRING -assert node.kind == KUZU_NODE +assert id.kind == LBUG_INT64 +assert thing.kind == LBUG_STRING +assert node.kind == LBUG_NODE diff --git a/tests/values/t_raise_error_on_invalid_conversion.nim b/tests/values/t_raise_error_on_invalid_conversion.nim index 3c98736..6ff8e47 100644 --- a/tests/values/t_raise_error_on_invalid_conversion.nim +++ b/tests/values/t_raise_error_on_invalid_conversion.nim @@ -2,9 +2,9 @@ import std/re -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( "CREATE NODE TABLE Doop ( id SERIAL, thing STRING, PRIMARY KEY(id) )" ) @@ -14,12 +14,12 @@ q = conn.query( "MATCH (d:Doop) RETURN d" ) var tup = q.getNext var val = tup[0] -assert val.kind == KUZU_NODE +assert val.kind == LBUG_NODE try: discard val.toInt32 -except KuzuTypeError as err: - assert err.msg.contains( re"""Mismatched types: KUZU_NODE != {KUZU_INT32}""" ) +except LbugTypeError as err: + assert err.msg.contains( re"""Mismatched types: LBUG_NODE != {LBUG_INT32}""" ) q = conn.query( "RETURN 1" ) @@ -27,7 +27,7 @@ val = q.getNext[0] try: discard val.toStruct -except KuzuTypeError as err: - assert err.msg.contains( re"""Mismatched types: KUZU_INT.* != {KUZU_NODE, KUZU_REL,.*}""" ) +except LbugTypeError as err: + assert err.msg.contains( re"""Mismatched types: LBUG_INT.* != {LBUG_NODE, LBUG_REL,.*}""" ) diff --git a/tests/values/t_raises_error_on_struct_missing_key.nim b/tests/values/t_raises_error_on_struct_missing_key.nim index 63c77a3..bfb5e65 100644 --- a/tests/values/t_raises_error_on_struct_missing_key.nim +++ b/tests/values/t_raises_error_on_struct_missing_key.nim @@ -2,9 +2,9 @@ import std/re -import kuzu +import lbug -let db = newKuzuDatabase() +let db = newLbugDatabase() let conn = db.connect var q = conn.query( """RETURN {test1: 1, test2: "bewts"} AS struct""" ) @@ -15,7 +15,7 @@ assert struct.keys == @["test1", "test2"] try: discard struct["nope"] -except KuzuIndexError as err: +except LbugIndexError as err: assert err.msg.contains( re"""No such struct key "nope"""" )