Api for ATTACH DATABASE

Hi,
Is there any API available to ATTACH DATABASE, instead of passing it as an sql query to sqlite3_exec? I am using sqlcipher version:
3.7.17 2013-05-20 00:56:22 118a3b35693b134d56ebd780123b7fd6f1497668

char *db_ssl_key=“abcd”;
sprintf(sqlQuery,“ATTACH DATABASE ‘/tmp/encrypted.db’ AS encrypted KEY ‘%s’”,db_ssl_key);
if(sqlite3_exec(persistence_db, sqlQuery, NULL, NULL, &zErrMsg) != SQLITE_OK)
printf(“Error while attaching”);

Hello @pdp,

You could also use a compiled statement through the sqlite3_prepare API.