Skip to content

Commit b944064

Browse files
committed
Add overlay builtins to python dbscheme
1 parent 6e38087 commit b944064

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

config/dbscheme-fragments.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"fragments": [
1010
"/*- Compilations -*/",
1111
"/*- External data -*/",
12+
"/*- Overlay support -*/",
1213
"/*- Files and folders -*/",
1314
"/*- Diagnostic messages -*/",
1415
"/*- Diagnostic messages: severity -*/",

python/extractor/semmle/dbscheme.template

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,22 @@ externalData(
4040
string value : string ref
4141
);
4242

43+
/*- Overlay support -*/
44+
45+
/**
46+
* The CLI will automatically emit the tuple `databaseMetadata("isOverlay", "true")`,
47+
* along with an `overlayChangedFiles` tuple for each new/modified/deleted file,
48+
* when building an overlay database, and these can be used by the discard predicates.
49+
*/
50+
databaseMetadata(
51+
string metadataKey : string ref,
52+
string value : string ref
53+
);
54+
55+
overlayChangedFiles(
56+
string path : string ref
57+
);
58+
4359
/*- DEPRECATED: Snapshot date -*/
4460

4561
snapshotDate(unique date snapshotDate : date ref);

python/ql/lib/semmlecode.python.dbscheme

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,22 @@ externalData(
4747
string value : string ref
4848
);
4949

50+
/*- Overlay support -*/
51+
52+
/**
53+
* The CLI will automatically emit the tuple `databaseMetadata("isOverlay", "true")`,
54+
* along with an `overlayChangedFiles` tuple for each new/modified/deleted file,
55+
* when building an overlay database, and these can be used by the discard predicates.
56+
*/
57+
databaseMetadata(
58+
string metadataKey : string ref,
59+
string value : string ref
60+
);
61+
62+
overlayChangedFiles(
63+
string path : string ref
64+
);
65+
5066
/*- DEPRECATED: Snapshot date -*/
5167

5268
snapshotDate(unique date snapshotDate : date ref);

0 commit comments

Comments
 (0)