You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: stage_descriptions/base-01-dr6.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,17 @@
1
-
In this stage, you'll implement the `.dbinfo`[dot command](https://www.sqlite.org/cli.html#special_commands_to_sqlite3_dot_commands_), which prints metadata about a SQLite database.
1
+
In this stage, you'll implement printing the page size of a SQLite database file via the `.dbinfo`[dot command](https://www.sqlite.org/cli.html#special_commands_to_sqlite3_dot_commands_).
2
2
3
3
### `.dbinfo`
4
4
5
+
`.dbinfo` is a [dot command](https://www.sqlite.org/cli.html#special_commands_to_sqlite3_dot_commands_) that prints metadata about a SQLite database.
6
+
5
7
The `.dbinfo` command is executed like this:
8
+
6
9
```
7
10
$ sqlite3 sample.db .dbinfo
8
11
```
9
12
10
13
It outputs metadata about the database file:
14
+
11
15
```yaml
12
16
database page size: 4096
13
17
write format: 1
@@ -23,6 +27,7 @@ In this stage, your `.dbinfo` command only needs to output the "database page si
23
27
### Database file
24
28
25
29
The SQLite database file begins with the database header. The database page size is stored in the header, right after the magic string. It's a 2-byte, big-endian value (read left-to-right).
0 commit comments