Closed ohlookemus closed 8 years ago
Metadata support is missing as you noticed.
Likely what should change is that sqlservice's declarative_base
should accept metaclass
and metadata
arguments (defaults as None
). If they are None
, then cls.Meta
and cls.metadata
(possibly in the future changing cls.Meta
to cls.metaclass
) would be used if they are defined.
So basically someone could define metaclass/metadata at the class level and have it used in declarative_base
or one could define them independent of the base class and instad pass the values explicitly.
This feature has been released in v0.5.0: https://pypi.python.org/pypi/sqlservice/0.5.0
Thanks!
This might be me just not reading through the API reference and sourcecode, but I noticed there's no way to pass in metadata like Alchy before.
Alchy:
In sqlservice:
I think an easy solution (which I could open a PR for) is to just add metadata to the options dict?