Remove ObjectId from the tree

This was one of the last remaining Mongo holdouts and has been removed from
the tree herewith. Good bye, ObjectId.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth
2012-12-25 20:52:25 +01:00
parent c338ed34fa
commit 71717fd531
7 changed files with 17 additions and 29 deletions

View File

@@ -21,17 +21,8 @@ calm the rest of the code base. Or provide super minimal
implementations.
Currently:
- ObjectId "class": It's a function mostly doing
int(init_arg) to convert string primary keys into
integer primary keys.
- DESCENDING "constant"
"""
DESCENDING = object() # a unique object for this "constant"
def ObjectId(value=None):
if value is None:
return None
return int(value)

View File

@@ -15,6 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#TODO: check now after mongo removal if we can't rip out a layer of abstraction
from mediagoblin.db.sql.fake import ObjectId, DESCENDING
from mediagoblin.db.sql.fake import DESCENDING
from mediagoblin.db.sql.util import atomic_update, check_media_slug_used, \
media_entries_for_tag_slug, check_collection_slug_used