how can i get column's default value in runtime?
is there way to access default value in drizzle's column during runtime?
it looks stored in ColumnBuilder.config.default, but idk how to can get it from columns
3 Replies
May I ask why do you need this?
Some cases like, getting Fallback values if data do not exist. (ex: settings for each user)
That value is saved in the column but is set as private. You can access it at runtime but the types are going to complain
In any case, this is rarely needed
If you need to insert a defaul value, you just don't include it in the insert statement and the default value will be inserted