forked from lingthio/Flask-User
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Obsoleted db_adapter.add_object. Renamed add_object2 to add_object.
- Loading branch information
Showing
2 changed files
with
9 additions
and
15 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -40,15 +40,6 @@ def find_objects(self, ObjectClass, **kwargs): | |
""" Retrieve all objects of type ``ObjectClass``, | ||
matching the filters specified in ``**kwargs`` -- case sensitive. | ||
""" | ||
|
||
raise NotImplementedError | ||
|
||
def get_object(self, ObjectClass, id): | ||
""" Retrieve object of type ``ObjectClass`` by ``id``. | ||
| Returns object on success. | ||
| Returns None otherwise. | ||
""" | ||
raise NotImplementedError | ||
|
||
def find_first_object(self, ObjectClass, **kwargs): | ||
|
@@ -60,15 +51,18 @@ def find_first_object(self, ObjectClass, **kwargs): | |
""" | ||
raise NotImplementedError | ||
|
||
def ifind_first_object(self, ObjectClass, **kwargs): | ||
""" Retrieve the first object of type ``ObjectClass``, | ||
matching the filters specified in ``**kwargs`` -- case insensitive. | ||
def get_object(self, ObjectClass, id): | ||
""" Retrieve object of type ``ObjectClass`` by ``id``. | ||
``ifind_first_object(User, email='[email protected]')`` translates to | ||
``User.query.filter(User.email.ilike('[email protected]')).first()``. | ||
| Returns object on success. | ||
| Returns None otherwise. | ||
""" | ||
raise NotImplementedError | ||
|
||
def save_object(self, object, **kwargs): | ||
""" Save object. Only for non-session centric Object-Database Mappers.""" | ||
raise NotImplementedError | ||
|
||
|
||
# Database management methods | ||
# --------------------------- | ||
|
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