Better version check
This commit is contained in:
@@ -22,8 +22,8 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "queue.h"
|
|
||||||
#include "sqlite3.h"
|
#include "sqlite3.h"
|
||||||
|
#include "queue.h"
|
||||||
|
|
||||||
#define MAX_ATOM_LENGTH 255 /* from atom.h, not exposed in erlang include */
|
#define MAX_ATOM_LENGTH 255 /* from atom.h, not exposed in erlang include */
|
||||||
#define MAX_PATHNAME 512 /* unfortunately not in sqlite.h. */
|
#define MAX_PATHNAME 512 /* unfortunately not in sqlite.h. */
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{require_min_otp_vsn, "R14"}.
|
{require_min_otp_vsn, "R14"}.
|
||||||
{port_env, [
|
{port_env, [
|
||||||
{"CFLAGS", "$CFLAGS -DSQLITE_THREADSAFE=1 -DSQLITE_USE_URI -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS"}]}.
|
{"CFLAGS", "$CFLAGS -DSQLITE_THREADSAFE=1 -DSQLITE_USE_URI -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS"}
|
||||||
|
]}.
|
||||||
{port_specs, [
|
{port_specs, [
|
||||||
{"priv/esqlite3_nif.so", ["c_src/*.c"]}]}.
|
{"priv/esqlite3_nif.so", ["c_src/esqlite3_nif.c", "c_src/queue.c", "c_src/sqlite3.c"]}
|
||||||
|
]}.
|
||||||
|
|||||||
@@ -298,14 +298,13 @@ sqlite_version_test() ->
|
|||||||
{ok, Db} = esqlite3:open(":memory:"),
|
{ok, Db} = esqlite3:open(":memory:"),
|
||||||
{ok, Stmt} = esqlite3:prepare("select sqlite_version() as sqlite_version;", Db),
|
{ok, Stmt} = esqlite3:prepare("select sqlite_version() as sqlite_version;", Db),
|
||||||
{sqlite_version} = esqlite3:column_names(Stmt),
|
{sqlite_version} = esqlite3:column_names(Stmt),
|
||||||
{row, {<<"3.8.8.2">>}} = esqlite3:step(Stmt),
|
?assertEqual({row, {<<"3.8.8.2">>}}, esqlite3:step(Stmt)),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
|
sqlite_source_id_test() ->
|
||||||
|
{ok, Db} = esqlite3:open(":memory:"),
|
||||||
|
{ok, Stmt} = esqlite3:prepare("select sqlite_source_id() as sqlite_source_id;", Db),
|
||||||
|
{sqlite_source_id} = esqlite3:column_names(Stmt),
|
||||||
|
?assertEqual({row, {<<"2015-01-30 14:30:45 7757fc721220e136620a89c9d28247f28bbbc098">>}}, esqlite3:step(Stmt)),
|
||||||
|
ok.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user