@@ -339,12 +339,49 @@ Then you can view them in `dolt_schemas`:
339
339
340
340
[DOLT_TAG()](./dolt-sql-procedures.md#dolt_tag) procedure can be used to INSERT and DELETE tags on the ` dolt_tags` table.
341
341
342
+ # ## Schema
343
+
344
+ ` ` ` text
345
+ +----------+----------+------+-----+---------+-------+
346
+ | Field | Type | Null | Key | Default | Extra |
347
+ +----------+----------+------+-----+---------+-------+
348
+ | tag_name | text | NO | PRI | NULL | |
349
+ | tag_hash | text | NO | PRI | NULL | |
350
+ | tagger | text | NO | | NULL | |
351
+ | email | text | NO | | NULL | |
352
+ | date | datetime | NO | | NULL | |
353
+ | message | text | NO | | NULL | |
354
+ +----------+----------+------+-----+---------+-------+
355
+ ` ` `
356
+
357
+ # ## Example Query
358
+
359
+ Create a tag using dolt_tag () stored procedure.
360
+
361
+ ` ` ` sql
362
+ CALL DOLT_TAG(' _migrationtest' ,' head' ,' -m' ,' savepoint for migration testing' );
363
+ ` ` `
364
+
365
+ ` ` ` text
366
+ +--------+
367
+ | status |
368
+ +--------+
369
+ | 0 |
370
+ +--------+
371
+ ` ` `
372
+
373
+ Get all the tags.
374
+
375
+ {% embed url=" https://www.dolthub.com/repositories/dolthub/first-hour-db/embed/main?q=SELECT+*+FROM+dolt_tags%3B" %}
376
+
342
377
# # `dolt_statistics`
343
378
344
379
` dolt_statistics` includes currently collected
345
380
database statistics. This information is stored outside of the
346
381
commit graph and is not subject to versioning semantics.
347
382
383
+ # ## Schema
384
+
348
385
` ` ` sql
349
386
+-----------------+----------+------+-----+---------+-------+
350
387
| Field | Type | Null | Key | Default | Extra |
@@ -371,41 +408,6 @@ commit graph and is not subject to versioning semantics.
371
408
+-----------------+----------+------+-----+---------+-------+
372
409
` ` `
373
410
374
- # ## Schema
375
-
376
- ` ` ` text
377
- +----------+----------+
378
- | Field | Type |
379
- +----------+----------+
380
- | tag_name | text |
381
- | tag_hash | text |
382
- | tagger | text |
383
- | email | text |
384
- | date | datetime |
385
- | message | text |
386
- +----------+----------+
387
- ` ` `
388
-
389
- # ## Example Query
390
-
391
- Create a tag using dolt_tag () stored procedure.
392
-
393
- ` ` ` sql
394
- CALL DOLT_TAG(' _migrationtest' ,' head' ,' -m' ,' savepoint for migration testing' );
395
- ` ` `
396
-
397
- ` ` ` text
398
- +--------+
399
- | status |
400
- +--------+
401
- | 0 |
402
- +--------+
403
- ` ` `
404
-
405
- Get all the tags.
406
-
407
- {% embed url=" https://www.dolthub.com/repositories/dolthub/first-hour-db/embed/main?q=SELECT+*+FROM+dolt_tags%3B" %}
408
-
409
411
# Database History System Tables
410
412
411
413
# # `dolt_blame_$tablename`
@@ -1114,8 +1116,8 @@ These tables can be modified in order to update what changes are staged for comm
1114
1116
# ## Schema
1115
1117
1116
1118
The schema of the source table is going to effect the schema of the workspace table. The first
1117
- three column are always the same, then the schema of the source table is used to create " to_ " and
1118
- " from_ " columns.
1119
+ three column are always the same, then the schema of the source table is used to create " to\_ " and
1120
+ " from\_ " columns.
1119
1121
1120
1122
Each row in the ` dolt_workspace_$TABLENAME ` corresponds to a single row update in the table.
1121
1123
@@ -1139,18 +1141,21 @@ workspace which means all queries in your session contain them but they will not
1139
1141
in the event that [` dolt_commit()` ](dolt-sql-procedures.md#dolt_commit) is executed.
1140
1142
1141
1143
There are two ways you can alter the state of your workspace using these tables.
1142
- 1) The ` staged` column can be toggled for any row. If changing from false to true, the row values will be moved
1143
- to staging. If there are already staged changes for that row, they will be overwritten. If changing from true to
1144
- false, the row values will be unstaged. If there are other changes in the workspace for that row, the workspace
1145
- change will be preserved and the staged change will be dropped.
1146
- 2) Any row which has ` staged = FALSE` can be deleted. This will result in reverting the change to the row in the source table.
1144
+
1145
+ 1. The ` staged` column can be toggled for any row. If changing from false to true, the row values will be moved
1146
+ to staging. If there are already staged changes for that row, they will be overwritten. If changing from true to
1147
+ false, the row values will be unstaged. If there are other changes in the workspace for that row, the workspace
1148
+ change will be preserved and the staged change will be dropped.
1149
+ 2. Any row which has ` staged = FALSE` can be deleted. This will result in reverting the change to the row in the source table.
1147
1150
1148
1151
# ## Example Query
1152
+
1149
1153
` ` ` sql
1150
1154
SELECT *
1151
1155
FROM dolt_workspace_mytable
1152
1156
WHERE staged=false
1153
1157
` ` `
1158
+
1154
1159
` ` ` text
1155
1160
+----+--------+-----------+-------+----------+---------+------------+
1156
1161
| id | staged | diff_type | to_id | to_value | from_id | from_value |
@@ -1168,6 +1173,7 @@ call dolt_commit("-m", "Added row id 3 in my table")
1168
1173
` ` `
1169
1174
1170
1175
# ## Notes
1176
+
1171
1177
The ` dolt_workspace_$TABLENAME ` tables are generated based on the session state when inspected,
1172
1178
so they can not be considered stable on a branch which has multiple editors.
1173
1179
0 commit comments