api: using shared sqlite3 connection