Differences From Artifact [444eff2fa6]:
- File src/sqlcmd.c — part of check-in [f922f4e3cc] at 2014-11-28 14:07:35 on branch trunk — Enhance the "fossil sql" command so that one or more SQL statements and/or dot-commands can be entered on the command-line. Also automatically ATTACH the local database and the config database, if they are available. (user: drh size: 5183)
To Artifact [5076b91de7]:
- File src/sqlcmd.c — part of check-in [7a588fe662] at 2014-11-28 17:23:46 on branch trunk — Add the "files_of_checkin" virtual table. (user: drh size: 5204) [more...]
| ︙ | |||
124 125 126 127 128 129 130 131 132 133 134 135 136 137 | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | + |
sqlite3_create_function(db, "content", 1, SQLITE_UTF8, 0,
sqlcmd_content, 0, 0);
sqlite3_create_function(db, "compress", 1, SQLITE_UTF8, 0,
sqlcmd_compress, 0, 0);
sqlite3_create_function(db, "decompress", 1, SQLITE_UTF8, 0,
sqlcmd_decompress, 0, 0);
re_add_sql_func(db);
foci_register(db);
g.zMainDbType = "repository";
g.repositoryOpen = 1;
g.db = db;
db_open_config(1);
if( g.zLocalDbName ){
zSql = sqlite3_mprintf("ATTACH %Q AS localdb;", g.zLocalDbName);
rc = sqlite3_exec(db, zSql, 0, 0, 0);
|
| ︙ |