On Wednesday, June 1, 2016 at 10:39:22 AM UTC+10, Mike Bayer wrote:
> have you tried psycopg2? pypostgresql is not a well supported dialect.
>
That's fixed it - thanks Mike (and thanks for creating SQLAlchemy and
Mako).
--
You received this message because you are subscribed to the Google
have you tried psycopg2? pypostgresql is not a well supported dialect.
On 05/31/2016 07:51 PM, Andrew M wrote:
Hi,
Thanks for SQLAlchemy. I'm trying to insert some JSONB into a PostgreSQL
database. My insert succeeds if the column type is JSON but fails if the
type is JSONB.
SQLAlchemy
Hi,
Thanks for SQLAlchemy. I'm trying to insert some JSONB into a PostgreSQL
database. My insert succeeds if the column type is JSON but fails if the
type is JSONB.
SQLAlchemy version: sqlalchemy-1.0.13
PostgreSQL: 9.5.3
DBAPI: py-postgresql
Python: 3.4
OS: Windows 8.1 64-bit
Here's my test
Hi Michael,
The backref/backpopulate was my attempt at cleaning this up, and I've
obviously made more of a mess of it. (^_^)
The patient_id as a FK (versus use of the PK from the patient table) was a
deliberate choice for ease of getting the db up. It was indexed in the
patient table on the db
you should use "dynamic" and your relationships are mis-configured with
mis-use of the backref() construct, as you've constructed relationships
on both sides that are mutual you'd use back_populates:
class Encounter(Model):
patient = relationship(
"Patient",
I guess my question is: How can I efficiently load Patient and its related
Encounters? I have tried various loading strategies of dynamic, joined (I
would think this would be the desired option), subquery, no load, etc., and
it these do not load. On the other hand, I can load Encounter just
Thanks Mike.
I'm not sure FunctionElement is most appropriate or if Interval() is the
best "type," but for future readers, as a recipe, this seems to work:
class seconds_interval(FunctionElement):
type = Interval()
name = 'seconds'
def __init__(self, *args, **kwargs):
I have the following two models:
Class Encounter(Model):
__tablename__ = 'cp_service'
id = Column(Integer, primary_key=True, autoincrement=True)
master_service_id = Column(String(255))
admission_datetime = Column(DateTime)
admission_provider_id = Column(String(255))