Skip to content
This repository has been archived by the owner on Apr 27, 2020. It is now read-only.

SQLAlchemy extension. #7

Merged
merged 14 commits into from Mar 3, 2015
Merged

SQLAlchemy extension. #7

merged 14 commits into from Mar 3, 2015

Conversation

luckyasser
Copy link

  • Change links representation.
  • Add sqla extension module.

class Collection(royal.Collection):
sa_model = None
sa_exceptions = None
entity_cls = None
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ^ doesn't look decent.. But I've tried it with zope interfaces and it doesn't look any prettier too.. Suggestions ?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not get what you want to do here.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I get it: dependency injection? Should we define a clean interface of sa_model?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's what I did at first.. But why only for sa_model ? what about entity_cls ?
May be we just document the expected injection ?
I used to be a fan of interfaces back in the Java and C++ days, but it doesn't sound like a python thing.. I think if we follow that notion strictly, it'll be tedious and may be unpythonic..?

@coveralls
Copy link

Coverage Status

Coverage decreased (-10.53%) to 81.7% when pulling d016a34 on luckyasser:master into 566f1b8 on hadrien:master.

self.name)

def on_traversing(self, key):
self.load_entity()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might not want this.

@coveralls
Copy link

Coverage Status

Coverage decreased (-10.11%) to 82.12% when pulling 6708e54 on luckyasser:master into 566f1b8 on hadrien:master.


class Collection(royal.Collection):

sa_model = None
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

session = None

@coveralls
Copy link

Coverage Status

Coverage decreased (-10.35%) to 81.88% when pulling 93ae2c1 on luckyasser:master into 566f1b8 on hadrien:master.


@staticmethod
def flush():
Session.flush()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat

@coveralls
Copy link

Coverage Status

Coverage decreased (-10.58%) to 81.65% when pulling 7f39a8c on luckyasser:master into 566f1b8 on hadrien:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-10.11%) to 82.12% when pulling e62a725 on luckyasser:master into 566f1b8 on hadrien:master.

@hadrien
Copy link
Owner

hadrien commented Feb 27, 2015

Please update version number in setup.cfg file.

@hadrien hadrien changed the title royal 0.8 sqlalchemy extension. Feb 27, 2015
@hadrien hadrien changed the title sqlalchemy extension. SqlAlchemy extension. Feb 27, 2015
@hadrien hadrien changed the title SqlAlchemy extension. SQLAlchemy extension. Feb 27, 2015
@hadrien hadrien merged commit 11351df into hadrien:master Mar 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants