mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-09 07:08:07 -04:00
Whitespace and miscellaneous cleanup
This commit is contained in:
parent
f3ef52b1ff
commit
4def999402
1 changed files with 59 additions and 50 deletions
31
dbdimp.c
31
dbdimp.c
|
@ -86,7 +86,7 @@ sqlite_db_login(SV *dbh, imp_dbh_t *imp_dbh, char *dbname, char *user, char *pas
|
|||
int retval;
|
||||
char *errmsg = NULL;
|
||||
|
||||
if (DBIS->debug >= 3) {
|
||||
if ( DBIS->debug >= 3 ) {
|
||||
PerlIO_printf(DBILOGFP, " login '%s' (version %s)\n",
|
||||
dbname, sqlite3_version);
|
||||
}
|
||||
|
@ -126,13 +126,16 @@ sqlite_db_login(SV *dbh, imp_dbh_t *imp_dbh, char *dbname, char *user, char *pas
|
|||
|
||||
DBIc_ACTIVE_on(imp_dbh);
|
||||
|
||||
/*
|
||||
if ( DBIc_WARN(imp_dbh) ) {
|
||||
warn("DBIc_WARN is on");
|
||||
}
|
||||
/*
|
||||
else {
|
||||
warn("DBIc_WARN if off");
|
||||
}
|
||||
if ( DBIc_is(imp_dbh, DBIcf_PrintWarn) ) {
|
||||
warn("DBIcf_PrintWarn is on");
|
||||
}
|
||||
*/
|
||||
|
||||
return TRUE;
|
||||
|
@ -186,7 +189,12 @@ sqlite_db_destroy (SV *dbh, imp_dbh_t *imp_dbh)
|
|||
{
|
||||
dTHR;
|
||||
if (DBIc_ACTIVE(imp_dbh)) {
|
||||
/* warn("DBIc_ACTIVE is on"); */
|
||||
sqlite_db_disconnect(dbh, imp_dbh);
|
||||
/*
|
||||
} else {
|
||||
warn("DBIc_ACTIVE is off");
|
||||
*/
|
||||
}
|
||||
DBIc_IMPSET_off(imp_dbh);
|
||||
}
|
||||
|
@ -272,9 +280,9 @@ sqlite_st_prepare (SV *sth, imp_sth_t *imp_sth,
|
|||
}
|
||||
|
||||
sqlite_trace(2, "prepare statement: %s", statement);
|
||||
imp_sth->nrow = -1;
|
||||
imp_sth->retval = SQLITE_OK;
|
||||
imp_sth->params = newAV();
|
||||
imp_sth->nrow = -1;
|
||||
imp_sth->retval = SQLITE_OK;
|
||||
imp_sth->params = newAV();
|
||||
imp_sth->col_types = newAV();
|
||||
Newz(0, imp_sth->statement, strlen(statement)+1, char);
|
||||
|
||||
|
@ -609,9 +617,9 @@ sqlite_st_finish3 (SV *sth, imp_sth_t *imp_sth, int is_destroy)
|
|||
if (!DBIc_ACTIVE(imp_dbh)) /* no longer connected */
|
||||
return 1;
|
||||
|
||||
if (is_destroy) {
|
||||
return TRUE;
|
||||
}
|
||||
if (is_destroy) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ((imp_sth->retval = sqlite3_reset(imp_sth->stmt)) != SQLITE_OK) {
|
||||
char *errmsg = (char*)sqlite3_errmsg(imp_dbh->db);
|
||||
|
@ -723,7 +731,7 @@ sqlite_st_FETCH_attrib (SV *sth, imp_sth_t *imp_sth, SV *keysv)
|
|||
int i,n;
|
||||
|
||||
if (!DBIc_ACTIVE(imp_sth)) {
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* warn("fetch: %s\n", key); */
|
||||
|
@ -764,7 +772,7 @@ sqlite_st_FETCH_attrib (SV *sth, imp_sth_t *imp_sth, SV *keysv)
|
|||
if (fieldtype)
|
||||
av_store(av, n, newSVpv(fieldtype, 0));
|
||||
else
|
||||
av_store(av, n, newSVpv("VARCHAR", 0));
|
||||
av_store(av, n, newSVpv("VARCHAR", 0));
|
||||
}
|
||||
}
|
||||
else if (strEQ(key, "NULLABLE")) {
|
||||
|
@ -1076,7 +1084,8 @@ sqlite_db_aggr_finalize_dispatcher( sqlite3_context *context )
|
|||
}
|
||||
|
||||
if ( aggr->err ) {
|
||||
warn( "DBD::SQLite: error in aggregator cannot be reported to SQLite: %s", SvPV_nolen( aggr->err ) );
|
||||
warn( "DBD::SQLite: error in aggregator cannot be reported to SQLite: %s",
|
||||
SvPV_nolen( aggr->err ) );
|
||||
|
||||
/* sqlite_db_set_result( context, aggr->err, 1 ); */
|
||||
SvREFCNT_dec( aggr->err );
|
||||
|
|
Loading…
Add table
Reference in a new issue