SRombauts/SQLiteCpp

Is math function possible?

kim-com opened this issue · 1 comments

When I execute query that SELECT sin(30), i got the error.

this is my code

SQLite::Database db("monitor.db", SQLite::OPEN_READWRITE | SQLite::OPEN_CREATE);

    std::string res = db.execAndGet("SELECT sin(30);");
    std::cout << "res : " << res << std::endl;

This is the response.

terminate called after throwing an instance of 'SQLite::Exception'
  what():  no such function: sin
Aborted

sqlite3 version is 3.41.2 on my local pc.
and If i use internal sqlite3, sqlite3 version is 3.43.0.

I got solved.

after removing installed internal-sqlite3 library and header file, CMake can find system sqlite3 on local pc.

I think internal-sqlite3 not include 'sqlite_enable_math_functions'