-
Notifications
You must be signed in to change notification settings - Fork 58
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
api: write a connection schema getter #355
Conversation
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.
Apparently we had a misunderstanding.
I would like to see a separate public function that would returns the current-actual schema. It shouldn't return a schema used by the connection, but re-fetch an actual one. Something like Connection.loadSchema()
in the current implementation.
70fdc03
to
92fe8b5
Compare
66c5253
to
954c5b5
Compare
663b54b
to
7f0cffc
Compare
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.
Thank you!
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.
Hi, thanks for the patch! See small comments below.
Also, please fix typo in commit message:
used needs to use
-> one needs to use
.
Write a helper function to load the actual schema for the user. Previously we stored actual schema in a private `schemaResolver` field and `Schema` field was used only to get a current schema. But now because of the new function, we don't need to store the `Schema` as a different field. So `Schema` was also removed. To update the schema, one needs to use `GetSchema` + `SetSchema` in pair. `SetSchema(Schema)` replacing the `OverrideSchema(*Schema)`. `Spaces` and `SpacesById` fields of the `Schema` struct store spaces by value. `Fields` and `FieldsById` fields of the `Space` struct store fields by value. `Index` and `IndexById` fields of the `Space` struct store indexes by value. `Fields` field of the `Index` struct store `IndexField` by value. Closes #7
7f0cffc
to
03e6c25
Compare
Write a helper function to load the actual schema for the user.
Previously we stored actual schema in a private
schemaResolver
field andSchema
field was used only to get a current schema. But now because of the new function, we don't need to store theSchema
as a different field. SoSchema
was also removed.To update the schema, one needs to use
GetSchema
+SetSchema
in pair.SetSchema(Schema)
replacing theOverrideSchema(*Schema)
.Spaces
andSpacesById
fields of theSchema
struct store spaces by value.Fields
andFieldsById
fields of theSpace
struct store fields by value.Index
andIndexById
fields of theSpace
struct store indexes by value.Fields
field of theIndex
struct storeIndexField
by value.I didn't forget about (remove if it is not applicable):
Closes #7