cd /users/me/sqlite3
CPPFLAGS="-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS" ./configure
make install
sqlite3 mydatabasefile.sqlite
The dynamic library will return its version number like this:
SQLite version 3.7.5
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
The dynamic library will return its version number like this:
SQLite version 3.7.5
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
public boolean checkFTS3(){
Connection testConnection = null;
boolean success = false;
try {
// We are building a temporary memory SQLite database
testConnection = DriverManager.getConnection("jdbc:sqlite::memory:");
Statement testStatement = testConnection.createStatement();
testStatement.setQueryTimeout(30);
testStatement.executeUpdate("DROP TABLE IF EXISTS testtable;");
testStatement.executeUpdate("CREATE VIRTUAL TABLE testtable USING FTS4(tid text, description text);");
testStatement.executeUpdate("INSERT INTO testtable VALUES("1", "Test Record");");
// No exception so far
success = true;
}
catch (SQLException e) {
System.out.println("checkFTS3 exception=" + e.getMessage());
}
finally {
try {
if (testConnection != null) {
testConnection.close();
}
}
catch (SQLException e) {
System.err.println(e);
}
return success;
}
}
Connection testConnection = null;
boolean success = false;
try {
// We are building a temporary memory SQLite database
testConnection = DriverManager.getConnection("jdbc:sqlite::memory:");
Statement testStatement = testConnection.createStatement();
testStatement.setQueryTimeout(30);
testStatement.executeUpdate("DROP TABLE IF EXISTS testtable;");
testStatement.executeUpdate("CREATE VIRTUAL TABLE testtable USING FTS4(tid text, description text);");
testStatement.executeUpdate("INSERT INTO testtable VALUES("1", "Test Record");");
// No exception so far
success = true;
}
catch (SQLException e) {
System.out.println("checkFTS3 exception=" + e.getMessage());
}
finally {
try {
if (testConnection != null) {
testConnection.close();
}
}
catch (SQLException e) {
System.err.println(e);
}
return success;
}
}