You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, maybe it's just me, but I can't find any documentation on how all this record_class thing works.
From what I understand I have to sub-class it:
classMyCustomRecord(asyncpg.Record):
id : intis_special : bool
Should match records from a table like, right?
CREATETABLEmytbl (
id SERIALPRIMARY KEY,
is_special BOOL NOT NULL DEFAULT TRUE
)
Also, what if the record has extra keys? (Lets say the above table had an extra column "price")
Do the variable names have to match with the ones in the db?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
So, maybe it's just me, but I can't find any documentation on how all this
record_class
thing works.From what I understand I have to sub-class it:
Should match records from a table like, right?
Also, what if the record has extra keys? (Lets say the above table had an extra column "price")
Do the variable names have to match with the ones in the db?
Beta Was this translation helpful? Give feedback.
All reactions