Activity Not Available
0
I Use This!

Project Summary

Analyzed about 1 month ago. based on code collected about 1 month ago.

THIS PROJECT HAS MOVEDhttp://github.com/g2p/tranquil

DescriptionThis is a small project that attempts to seamlessly integrate SQLAlchemy into the Django web framework.

It does this not by attempting to actually replace Django's ORM, but by implementing a Django application that automatically reflects the database and builds the SQLAlchemy ORM objects.

FeaturesAutomagically creates SQLAlchemy ORM objects Introspects Django models to include backreferences Able to provide custom SQLAlchemy table, object, and mapper objects. Can use Django models as objects for the SQLAlchemy ORM DocumentationRequirements Installation BasicUsage AdvancedUsage ExampleModels ExampleViews ExampleAlchemy MotivationSimple. Try getting a query like this out of Django:

SELECT root_source_1.id AS root_source_1_id,
root_source_1.name AS root_source_1_name,
root_source_1.description AS root_source_1_description,
root_source_1.identifier_id AS root_source_1_identifier_id,
root_featuretype_2.id AS root_featuretype_2_id,
root_featuretype_2.name AS root_featuretype_2_name,
root_featuretype_2.display AS root_featuretype_2_display,
root_feature.id AS root_feature_id,
root_feature.source_id AS root_feature_source_id,
root_feature.type_id AS root_feature_type_id,
root_feature.location AS root_feature_location,
root_propertytype_3.id AS root_propertytype_3_id,
root_propertytype_3.name AS root_propertytype_3_name,
root_propertytype_3.display AS root_propertytype_3_display,
root_property_4.id AS root_property_4_id,
root_property_4.feature_id AS root_property_4_feature_id,
root_property_4.type_id AS root_property_4_type_id,
root_property_4.value AS root_property_4_value,
root_property_4.idxfti AS root_property_4_idxfti
FROM (
SELECT DISTINCT
root_feature.id AS root_feature_id,
root_feature.id AS root_feature_oid
FROM root_feature
LEFT OUTER JOIN
root_property ON root_property.feature_id = root_feature.id
LEFT OUTER JOIN
root_propertytype ON root_property.type_id = root_propertytype.id
LEFT OUTER JOIN
root_location ON root_location.feature_id = root_feature.id
LEFT OUTER JOIN
root_modifier ON root_location.start_mod_id = root_modifier.id
LEFT OUTER JOIN
root_location AS root_location_5 ON root_location_5.feature_id = root_feature.id
LEFT OUTER JOIN
root_modifier AS root_modifier_6 ON root_location_5.end_mod_id = root_modifier_6.id
WHERE root_feature.source_id = %(root_feature_source_id)s
AND (
root_location.start + %(root_modifier_multiplier)s * root_modifier_6.multiplier =
%(literal_1)s
OR root_location.start + %(root_modifier_multiplier_2)s * root_modifier_6.multiplier >=
%(literal_2)s
AND root_location.start + %(root_modifier_multiplier_3)s * root_modifier_6.multiplier =
%(literal_4)s
AND root_location."end" + %(root_modifier_multiplier_5)s * root_modifier_6.multiplier

Share

Activity

30 Day Summary

Jun 30 2015 — Jul 30 2015

12 Month Summary

Jul 30 2014 — Jul 30 2015

Community

Ratings

Be the first to rate this project
 
Click to add your rating
   Spinner f6ecff617ec2ba7f559e6f535cad9b70a3f91120737535dab4d4548a6c83576c
 
Review this Project!