-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Go: extract and expose struct tags, interface method IDs
This enables us to distinguish all database types in QL. Previously structs with the same field names and types but differing tags, and interface types with matching method names and at least one non-exported method but declared in differing packages, were impossible or only sometimes possible to distinguish in QL. With this change these types can be distinguished, as well as permitting queries to examine struct field tags, e.g. to read JSON field name associations.
- Loading branch information
Showing
30 changed files
with
2,359 additions
and
3 deletions.
There are no files selected for viewing
546 changes: 546 additions & 0 deletions
546
go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/go.dbscheme
Large diffs are not rendered by default.
Oops, something went wrong.
552 changes: 552 additions & 0 deletions
552
go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/old.dbscheme
Large diffs are not rendered by default.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
go/downgrades/e47462df302b3e58a60d2e21f99aba63f973326f/upgrade.properties
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
description: Remove component-tags and interface-method-id tables | ||
compatibility: full | ||
|
||
component_tags.rel: delete | ||
interface_private_method_ids.rel: delete |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
7 changes: 7 additions & 0 deletions
7
go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/component_tags.ql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class StructType extends @structtype { | ||
string toString() { result = "struct type" } | ||
} | ||
|
||
from StructType st, int index | ||
where component_types(st, index, _, _) | ||
select st, index, "" |
Oops, something went wrong.