Skip to content

Commit

Permalink
Merge pull request #64 from josenavas/exists
Browse files Browse the repository at this point in the history
Add exists classmethod
  • Loading branch information
wasade committed May 30, 2014
2 parents 1138445 + 0b50660 commit 8371d7d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions qiita_db/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ class QiitaObject(object):

_table = None

@staticmethod
def create():
@classmethod
def create(cls):
"""Creates a new object with a new id on the storage system"""
raise QiitaDBNotImplementedError()

@staticmethod
def delete(id_):
@classmethod
def delete(cls, id_):
"""Deletes the object `id_` from the storage system
Parameters
Expand All @@ -65,6 +65,11 @@ def delete(id_):
"""
raise QiitaDBNotImplementedError()

@classmethod
def exists(cls):
"""Checks if a given object info is already present on the DB"""
raise QiitaDBNotImplementedError()

def __init__(self, id_):
"""Initializes the object
Expand Down

0 comments on commit 8371d7d

Please sign in to comment.