diff --git a/config/dbscheme-fragments.json b/config/dbscheme-fragments.json index c2a9a5e734b..a626025de0b 100644 --- a/config/dbscheme-fragments.json +++ b/config/dbscheme-fragments.json @@ -9,6 +9,7 @@ "fragments": [ "/*- Compilations -*/", "/*- External data -*/", + "/*- Overlay support -*/", "/*- Files and folders -*/", "/*- Diagnostic messages -*/", "/*- Diagnostic messages: severity -*/", diff --git a/python/extractor/semmle/dbscheme.template b/python/extractor/semmle/dbscheme.template index 07b65434bbd..43015df66f4 100644 --- a/python/extractor/semmle/dbscheme.template +++ b/python/extractor/semmle/dbscheme.template @@ -40,6 +40,22 @@ externalData( string value : string ref ); +/*- Overlay support -*/ + +/** + * The CLI will automatically emit the tuple `databaseMetadata("isOverlay", "true")`, + * along with an `overlayChangedFiles` tuple for each new/modified/deleted file, + * when building an overlay database, and these can be used by the discard predicates. + */ +databaseMetadata( + string metadataKey : string ref, + string value : string ref +); + +overlayChangedFiles( + string path : string ref +); + /*- DEPRECATED: Snapshot date -*/ snapshotDate(unique date snapshotDate : date ref); diff --git a/python/ql/lib/semmlecode.python.dbscheme b/python/ql/lib/semmlecode.python.dbscheme index 5af903da088..6a1f497168d 100644 --- a/python/ql/lib/semmlecode.python.dbscheme +++ b/python/ql/lib/semmlecode.python.dbscheme @@ -47,6 +47,22 @@ externalData( string value : string ref ); +/*- Overlay support -*/ + +/** + * The CLI will automatically emit the tuple `databaseMetadata("isOverlay", "true")`, + * along with an `overlayChangedFiles` tuple for each new/modified/deleted file, + * when building an overlay database, and these can be used by the discard predicates. + */ +databaseMetadata( + string metadataKey : string ref, + string value : string ref +); + +overlayChangedFiles( + string path : string ref +); + /*- DEPRECATED: Snapshot date -*/ snapshotDate(unique date snapshotDate : date ref);