mirror of
https://github.com/uroni/urbackup_backend.git
synced 2025-10-26 11:36:50 +00:00
39 lines
1.7 KiB
C
39 lines
1.7 KiB
C
struct previous_mode_data {
|
|
int valid; /* Is there legit data in here? */
|
|
int mode;
|
|
int showHeader;
|
|
int colWidth[100];
|
|
};
|
|
|
|
/*
|
|
** An pointer to an instance of this structure is passed from
|
|
** the main program to the callback. This is used to communicate
|
|
** state and mode information.
|
|
*/
|
|
struct callback_data {
|
|
sqlite3 *db; /* The database */
|
|
int echoOn; /* True to echo input commands */
|
|
int statsOn; /* True to display memory stats before each finalize */
|
|
int cnt; /* Number of records displayed so far */
|
|
FILE *out; /* Write results here */
|
|
int nErr; /* Number of errors seen */
|
|
int mode; /* An output mode setting */
|
|
int writableSchema; /* True if PRAGMA writable_schema=ON */
|
|
int showHeader; /* True to show column names in List or Column mode */
|
|
char *zDestTable; /* Name of destination table when MODE_Insert */
|
|
char separator[20]; /* Separator character for MODE_List */
|
|
int colWidth[100]; /* Requested width of each column when in column mode*/
|
|
int actualWidth[100]; /* Actual width of each column */
|
|
char nullvalue[20]; /* The text to print when a NULL comes back from
|
|
** the database */
|
|
struct previous_mode_data explainPrev;
|
|
/* Holds the mode information just before
|
|
** .explain ON */
|
|
char outfile[FILENAME_MAX]; /* Filename for *out */
|
|
const char *zDbFilename; /* name of the database file */
|
|
const char *zVfs; /* Name of VFS to use */
|
|
sqlite3_stmt *pStmt; /* Current statement if any. */
|
|
FILE *pLog; /* Write log output here */
|
|
};
|
|
|
|
int do_meta_command_r(char *zLine, struct callback_data *p); |