-
Notifications
You must be signed in to change notification settings - Fork 619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build from source with ICU extension #1166
Comments
Have this lib dynamically link against the libsqlite3 with your options. |
I didn't quite understand it at the time of compilation jdbc-sqlite ? |
Build sqlite3 first, then link this native code against it. |
I try build
If you build a project using public Application() {
String url = "jdbc:sqlite:example.db";
Connection connection = null;
Properties properties = new Properties();
properties.setProperty("enable_load_extension", String.valueOf(true));
try {
connection = DriverManager.getConnection(url,properties);
Statement sm = connection.createStatement();
// I TRY DIFFERENT VARIANTS
// ResultSet rr = sm.executeQuery("select * from");
// sm.execute("SELECT load_extension('libSqliteIcu64');");
// sm.execute("SELECT load_extension('C:\\Users\\LykovA\\Desktop\\Workplace\\Projects\\untitled1\\dll\\libSqliteIcu64',sqlite3_extension_init);");
String searchName = "%а%";
String sql = "SELECT * FROM users WHERE LOWER(name) LIKE LOWER('" + searchName + "')";
ResultSet rs = sm.executeQuery(sql);
// Обработка результатов
while (rs.next()) {
int id = rs.getInt("id");
String name = rs.getString("name");
int age = rs.getInt("age");
System.out.println("ID: " + id + ", Name: " + name + ", Age: " + age);
}
// Закрытие ResultSet
rs.close();
} catch (SQLException throwables) {
throwables.printStackTrace();
}
} |
How i can compile jdbc-sqlite with new native (own-compiled from source code) sqlite.dll ? |
you don't need to. You can load your own |
Thank you, but i try this with sqlite with icu extension dll and get error:
I do this with compile from source code sqlite dll without icu, but get same error. But when i get sqlite dll from source code jdbc-sqlite, it worked. Maybe i missing flag when compile source code? For example. I build from mingw32 for windows ? gcc -I. -shared -fPIC sqlite3.c -ldl -lm -lreadline -lncurses -o sqlite3_32.dll Help me please |
you can check here https://github.com/xerial/sqlite-jdbc/blob/master/.github/workflows/ci.yml#L157-L181 how we build against an external amalgamation |
Hello!
Please tell me how to compile jdbc-sqlite.jar from sources with additional ICU module?
Thanks in advance!
The text was updated successfully, but these errors were encountered: