half function for sqlite3 as loadable extension.