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
I removed various unnecessary info here to reduce code to a minimum.
My question now is if this._db._.fullSchema.somethingElse is a good way to access the drizzle schema (it may or may not contains relations) as I don't want to use a direct import of the schema due to the fact that all dependencies should only be injected via the constructor or is there a better way to do this?
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
-
Hey,
we setup a Database class that initializes Drizzle for us (everything is work in progress)
We setup the db like this
and want to use it in repository classes similar to this
I removed various unnecessary info here to reduce code to a minimum.
My question now is if
this._db._.fullSchema.somethingElse
is a good way to access the drizzle schema (it may or may not contains relations) as I don't want to use a direct import of the schema due to the fact that all dependencies should only be injected via the constructor or is there a better way to do this?Beta Was this translation helpful? Give feedback.
All reactions