gwenn / sqlite-jna Goto Github PK
View Code? Open in Web Editor NEWJava wrapper and Jdbc driver for SQLite using JNA or Bridj or JNR or JNI or JavaCPP.
License: The Unlicense
Java wrapper and Jdbc driver for SQLite using JNA or Bridj or JNR or JNI or JavaCPP.
License: The Unlicense
I am using sqlite3.dll 64bit version 3.31.1 and facing an error when creating a connection:
#Code
public class Test extends ScalarCallback {
protected void func(SQLite.SQLite3Context pCtx, SQLite.SQLite3Values args) {
int x=args.getInt(0);
pCtx.setResultInt(x+1);
}
public static void main(String[] args) throws Exception {
int flags = OpenFlags.SQLITE_OPEN_READWRITE | OpenFlags.SQLITE_OPEN_CREATE;
Conn c = Conn.open("test.sqlite",flags,null);
c.createScalarFunction("add_one",1, FunctionFlags.SQLITE_UTF8,new Test());
String sql="SELECT add_one(1)";
Stmt s=c.prepare(sql,false);
if (s.step(1)) {
System.out.println(s.getColumnInt(0));
}
}
}
#Error
Caused by: java.lang.IllegalArgumentException: class org.sqlite.BusyHandler is not a supported argument type (in method sqlite3_busy_handler in class org.sqlite.SQLite)
at com.sun.jna.Native.register(Native.java:1727)
at com.sun.jna.Native.register(Native.java:1370)
at org.sqlite.SQLite.(SQLite.java:31)
... 2 more
Please help me resolve it
Many thanks
Failed tests:
SqliteDatabaseMetadataTest.testGetColumns:346 arrays first differed at element [8]; expected:<...aster|rootpage|4|INT[EGER]|10|null|10|10|1|nul...> but was:<...aster|rootpage|4|INT[]|10|null|10|10|1|nul...>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.