MCPcopy Create free account
hub / github.com/audacity/audacity / arExecSql

Function arExecSql

lib-src/sqlite/shell.c:16610–16624  ·  view source on GitHub ↗

** Run the SQL statement in zSql. Or if doing a --dryrun, merely print it out. */

Source from the content-addressed store, hash-verified

16608** Run the SQL statement in zSql. Or if doing a --dryrun, merely print it out.
16609*/
16610static int arExecSql(ArCommand *pAr, const char *zSql){
16611 int rc;
16612 if( pAr->bDryRun ){
16613 utf8_printf(pAr->p->out, "%s\n", zSql);
16614 rc = SQLITE_OK;
16615 }else{
16616 char *zErr = 0;
16617 rc = sqlite3_exec(pAr->db, zSql, 0, 0, &zErr);
16618 if( zErr ){
16619 utf8_printf(stdout, "ERROR: %s\n", zErr);
16620 sqlite3_free(zErr);
16621 }
16622 }
16623 return rc;
16624}
16625
16626
16627/*

Callers 1

arCreateOrUpdateCommandFunction · 0.85

Calls 1

utf8_printfFunction · 0.85

Tested by

no test coverage detected