-
Notifications
You must be signed in to change notification settings - Fork 9
MAPRDB-397, MAPRDB-459 #1
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
Conversation
… language support. Added abstract classes as init commit for ticket.
… language support. Added set of functions for different data types
… language support. Removed functions for driver. Rename DriverManager to ConnectionManager.
… language support. Added part of Value interface and create O*types* files
… language support. MAPRDB-459 Implement ValueImpl class and subclasses like OTime, ODate, etc.. Added part of ValueImpl, OInterval
…, etc.. Added unit test for OInterval, minor changes in other classes and sample code.
…, etc.. Added OTime and ODate implementation
…, etc.. Added ODate implementation.
…, etc.. Added tests for OTime, ODate, OTimestamp. Added new implemented types to ValueImpl.
…for ValueType enum. Added part of Json . Added abstract classes.
adityakishore
left a comment
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.
- Separate the interfaces + public API classes and implementation+tests into individual pull requests.
- Move all the future interfaces (
DocumentReader, etc) into a separate pull request. - Squash multiple commits in a single pull request as one commit.
See comments inline.
| @@ -0,0 +1,6 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
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.
What's the purpose of this file?
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.
Accidentally was added
| store = DocumentStore(connection.get_store(store_name="/test_name")) | ||
|
|
||
| # Json string or json map | ||
| json_string = "json string" |
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.
Please use a valid JSON Document String, something like
{"name": "Joe", "age": 50, "address": {"street": "555 Moon Way", "city": "Gotham"}}
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.
Changed
|
|
||
| """Create a connection, get store, find document by id""" | ||
| # create a connection by path:user@password | ||
| connection = Connection(ConnectionManager.get_connection(url="ojai:mapr:user@password")) |
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.
I am going to update the functional spec with the new URL format, please update the example with a matching format.
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.
You mean that its must looks like
connection = Connection(ConnectionManager.get_connection(url="hostname:port")) and user@password is not required for connection?
| __metaclass__ = ABCMeta | ||
|
|
||
| @abstractmethod | ||
| def set_id(self, _id): |
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.
Can this single method accept both binary and string types as "_id" value?
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.
Yes, here will check which _id type was given
| raise NotImplementedError("Should have implemented this") | ||
|
|
||
| @abstractmethod | ||
| def get_id(self): |
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.
Would this return Value type? Is there a way to annotate the return type?
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.
Only in python3.5 and up
https://docs.python.org/3.5/library/typing.html
| @@ -0,0 +1,72 @@ | |||
| class JsonOptions: | |||
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 class is part of the public API and should be separated from implementation.
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.
Sure
| raise NotImplementedError("Should have implemented this") | ||
|
|
||
| @abstractmethod | ||
| def check_url(self, url): |
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 is not needed in the abstract class.
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.
removed check_url from abstract class
| @@ -0,0 +1,13 @@ | |||
|
|
|||
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.
Not required for initial release.
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.
Sure
| raise NotImplementedError("Should have implemented this") | ||
|
|
||
| @abstractmethod | ||
| def as_reader(self): |
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.
Not required for initial release.
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.
Sure
| @@ -0,0 +1,5 @@ | |||
| from abc import ABCMeta, abstractmethod | |||
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.
Not required for initial release.
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.
Sure
No description provided.