This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Vdbe { | |
sqlite3 *db; /* The database connection that owns this statement */ | |
Op *aOp; /* Space to hold the virtual machine's program */ | |
Mem *aMem; /* The memory locations */ | |
Mem **apArg; /* Arguments to currently executing user function */ | |
Mem *aColName; /* Column names to return */ | |
Mem *pResultSet; /* Pointer to an array of results */ | |
int nMem; /* Number of memory locations currently allocated */ | |
int nOp; /* Number of instructions in the program */ | |
VdbeCursor **apCsr; /* One element of this array for each open cursor */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sqlite> .schema names | |
CREATE TABLE names(id int, name string); | |
sqlite> INSERT INTO names VALUES (1, 'Holly'); | |
sqlite> SELECT * FROM names; | |
1 | Holly |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sqlite> EXPLAIN INSERT INTO names VALUES (1, 'Holly'); | |
addr opcode p1 p2 p3 p4 p5 comment | |
---- ------------- ---- ---- ---- ------------- -- ------------- | |
0 Trace 0 0 0 00 | |
1 Goto 0 10 0 00 Jump to address P2 (line 10 here, so starts transaction) | |
2 OpenWrite 0 2 0 2 00 Open a read/write cursor (only one permitted) | |
3 NewRowid 0 1 0 00 Record number, in this case specified in our INSERT statement | |
4 Integer 1 2 0 00 | |
5 String8 0 3 0 Holly 00 | |
6 MakeRecord 2 2 4 dc 00 Convert P2 registers beginning from P1 into a database record |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sqlite> EXPLAIN CREATE INDEX IF NOT EXISTS exampleidx ON names (id); | |
addr opcode p1 p2 p3 p4 p5 comment | |
---- ------------- ---- ---- ---- ------------- -- ------------- | |
0 Trace 0 0 0 00 | |
1 Goto 0 34 0 00 | |
2 CreateIndex 0 1 0 00 | |
3 OpenWrite 0 1 0 5 00 | |
4 NewRowid 0 2 0 00 | |
5 String8 0 3 0 index 00 | |
6 String8 0 4 0 exampleidx 00 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[LogstreamerInput] | |
log_directory = "/var/log" | |
file_match = 'syslog\.?(?P<Seq>\d*)' | |
priority = ["^Seq"] | |
[FileOutput] | |
message_matcher = "TRUE" | |
path = "/tmp/output" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mac Network Commands Cheat Sheet | |
After writing up the presentation for MacSysAdmin in Sweden, I decided to go ahead and throw these into a quick cheat sheet for anyone who’d like to have them all in one place. Good luck out there, and stay salty. | |
Get an ip address for en0: | |
ipconfig getifaddr en0 | |
Same thing, but setting and echoing a variable: |