-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make SQL more generic #95
base: main
Are you sure you want to change the base?
Conversation
PRIMARY KEY (id) | ||
); | ||
|
||
DROP TABLE statements; | ||
CREATE TABLE statements (stanza TEXT,subject TEXT,predicate TEXT,object TEXT,value TEXT,datatype TEXT,language TEXT); | ||
CREATE TABLE statements ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatting this like the other declarations
@@ -1493,15 +1501,17 @@ CREATE VIEW property_used_with_datatype_values_and_objects AS SELECT | |||
s1.predicate AS subject, | |||
s1.predicate, | |||
s1.datatype AS value | |||
FROM statements AS s1, statements AS s2 ON (s1.predicate=s2.predicate) | |||
FROM statements AS s1 | |||
JOIN statements AS s2 ON (s1.predicate=s2.predicate) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MySQL doesn't understand ,
for JOIN
s so making it explicit
-- patch statements table | ||
ALTER TABLE statements ADD COLUMN graph TEXT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This currently gets added in the build.Makefile
. Is there a reason for not adding it to the schema?
KBase is currently using the semsql schema with a MySQL database and is likely to use it with other SQL db types in the future. This PR alters a couple of lines to use more generic syntax.
Not sure whether I need to propagate these changes to the various other SQL files and the linkml schema.
Turn off whitespace changes - I didn't realise there were so many trailing spaces in the original file!