aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/util.py
diff options
context:
space:
mode:
authorSebastian Spaeth <Sebastian@SSpaeth.de>2012-11-29 17:23:28 +0100
committerSebastian Spaeth <Sebastian@SSpaeth.de>2012-12-25 20:06:03 +0100
commitbc142abc5592975c08319416d0af12c108504887 (patch)
tree45d2d0339768ca78b3bef37bb9c887e932470091 /mediagoblin/db/util.py
parent351fd95fff98d389711a1aa9cc3ba5d661a9b433 (diff)
downloadmediagoblin-bc142abc5592975c08319416d0af12c108504887.tar.lz
mediagoblin-bc142abc5592975c08319416d0af12c108504887.tar.xz
mediagoblin-bc142abc5592975c08319416d0af12c108504887.zip
RIP out mongo
Since sqlalchemy is providing our database abstraction and we have moved away from Mongo as the underlying database, it is now time to simplify things and rip out mongo. This provides the bulk of the changes, and can stand on its own. There are some followup tasks that can be done, such as removing now unneeded abstraction layers, e.g. db.sql.fake.py
Diffstat (limited to 'mediagoblin/db/util.py')
-rw-r--r--mediagoblin/db/util.py17
1 files changed, 4 insertions, 13 deletions
diff --git a/mediagoblin/db/util.py b/mediagoblin/db/util.py
index a8c8c92b..9fa3b204 100644
--- a/mediagoblin/db/util.py
+++ b/mediagoblin/db/util.py
@@ -14,16 +14,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-try:
- from mediagoblin.db.sql_switch import use_sql
-except ImportError:
- use_sql = False
-
-if use_sql:
- from mediagoblin.db.sql.fake import ObjectId, InvalidId, DESCENDING
- from mediagoblin.db.sql.util import atomic_update, check_media_slug_used, \
- media_entries_for_tag_slug, check_collection_slug_used
-else:
- from mediagoblin.db.mongo.util import \
- ObjectId, InvalidId, DESCENDING, atomic_update, \
- check_media_slug_used, media_entries_for_tag_slug
+#TODO: check now after mongo removal if we can't rip out a layer of abstraction
+from mediagoblin.db.sql.fake import ObjectId, InvalidId, DESCENDING
+from mediagoblin.db.sql.util import atomic_update, check_media_slug_used, \
+ media_entries_for_tag_slug, check_collection_slug_used