-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Issue with schema #694
Comments
See discussions in https://discourse.cayley.io/t/difficulty-using-the-schema-package/1107/14 also. |
You are right about the short form - schema lib naively assumes that all IRIs match exactly on insert and in struct tags. However, the It's time to do this properly. It will require all quad inserts to resolve to full form, and all queries to resolve their arguments to full form as well. For now, the best place for it is The downside is that users sometimes prefer to use short form, and now they will see a full form as an output of queries. Always printing short form will lead to the same confusion - written values might be in full form, while short form is returned as output. |
What I was thinking is create a Schema strict and have a DefaultSchema like
http.DefaultClient, and be able to configure the iriType in that reader. It
would also allow the types to be registered within that Schema instance, as
well as have its own reference to the QuadStore. Would simplify the
arguments to LoadTo.
The top level LoadTo could still use the DefaultSchema or create a new one
on the fly, with the current defaults.
What do you think? I wouldn't want to change the semantics for everyone or
force the Data to be always full either. If it's this way, it's probably
because some use the short form in their data.
Le jeu. 22 févr. 2018 03 h 39, Denys Smirnov <notifications@github.com> a
écrit :
… You are right about the short form - schema lib naively assumes that all
IRIs match exactly on insert and in struct tags. However, the @type
predicate is mapped to a short form, and resolution to full form is not
done correctly, I guess.
It's time to do this properly. It will require all quad inserts to resolve
to full form, and all queries to resolve their arguments to full form as
well. For now, the best place for it is QuadStore.ValueOf and
QuadStore.ApplyDeltas.
The downside is that users sometimes prefer to use short form, and now
they will see a full form as an output of queries. Always printing short
form will lead to the same confusion - written values might be in full
form, while short form is returned as output.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#694 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFs8MWBnJS233Htq4bQ8GPxni9JERu2ks5tXSeygaJpZM4SOSYP>
.
|
@abourget I think it's the best option for this particular case. Note that graphql endpoint will still fail the same way (it also uses |
@abourget Feel free to reopen if it does not cover your use case |
Wow great! Thanks!
…On Sat, Mar 3, 2018, 3:14 PM Denys Smirnov, ***@***.***> wrote:
@abourget <https://github.com/abourget> Feel free to reopen if it does
not cover your use case
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#694 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFs8Ko1AIzyELkx7R9TzJoIuXibXv0cks5tavmZgaJpZM4SOSYP>
.
|
Hi there, I've been searching for a bit of time now, a way to have this code work:
This is using version baf955d
Running
go test
on that fails.Anyone has insights ? I might have tripped over https://godoc.org/github.com/cayleygraph/cayley/schema#LoadTo where I read
Is it possible that this is not true ? That somehow Cayley expects the short form to be in the database ?
The text was updated successfully, but these errors were encountered: