0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2025-06-10 05:46:50 +00:00
Files
libsql/crates/bindings/c/example.c

19 lines
360 B
C
Raw Normal View History

/* gcc -I include example.c ../../target/debug/libsql_experimental.a ../../../.libs/libsqlite3.a && ./a.out */
2023-06-29 08:57:54 +03:00
#include "libsql.h"
#include <assert.h>
int main(int argc, char *argv[])
{
libsql_database_ref database;
database = libsql_open_ext(":memory:");
2023-06-29 08:57:54 +03:00
if (!database) {
assert(0);
}
libsql_exec(database, "SELECT 1");
libsql_close(database);
}