Fossil SCM
include sqlite shell with fossil
b18338c226f6fb4…
· opened 15 years, 5 months ago
- Type
- Feature_Request
- Priority
- —
- Severity
- Cosmetic
- Resolution
- Fixed
- Subsystem
- —
- Created
- Oct. 28, 2010 11:31 p.m.
There are a very small number of cases where it is necessary or desirable to work directly with the fossil database - debugging, exploring, or tweaking low-level data in a nonstandard and generally unrecommended way (for example, when merging repositories as described in http://www.mail-archive.com/[email protected]/msg01641.html ). Nevertheless, in those cases it is necessary to have the sqlite shell available separately. Fossil already bundles 95% of sqlite with it, so why not include the raw shell also? The main benefit (in those admittedly rare cases) would be that you are guaranteed to have the correct version of sqlite, while the shell installed elsewhere may be different (if you are tracking fossil and sqlite builds separately).
anonymous added on 2010-10-29 23:51:13: How to access functions accessible in fossil by built-in sqlite shell?
Thanks.
c:\bin>fossil help sqlite Usage: fossil sqlite3 ?DATABASE? ?OPTIONS? Run the standalone sqlite3 command-line shell on DATABASE with OPTIONS. If DATABASE is omitted, then the repository that serves the working directory is opened. c:\bin>fossil sqlite myfossilclone.fossil SQLite version 3.7.3 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> SELECT * FROM sqlite_master where name ='blob'; table|blob|blob|2|CREATE TABLE blob( rid INTEGER PRIMARY KEY, rcvid INTEGER, size INTEGER, uuid TEXT UNIQUE NOT NULL, content BLOB, CHECK( length(uuid)==40 AND rid>0 ) ) sqlite> select * from blob where rid =9310; 9310|526|43735|a67ab11ff47c2c026af817110a564a13fd9c33a2| sqlite> select content from blob where rid =9310; returns nothing