-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable string functions and arrays as default column values #82
Conversation
Sorry, but I do not quite understand purpose of this PR.
? |
The purpose of the 2 commits is to enable these two defaults (without using pgm.func): pgm.createTable('table', {
id: { type: 'uuid', default: 'gen_random_uuid()' },
table_2_ids: { type: uuid[]', default: [] }
}) Notice that the array isn't a string, but an array literal |
But that is the purpose of |
@dolezel what about the array literal as default? I don't see a problem as there's special treatment to booleans and nulls. I mean, you can say It seems better using Also, the added tests were discarded =0. |
Yes, that is a good idea, so please change your code to |
@dolezel done. Used your code with a small addition to allow multidimensional arrays, so that the added test pass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.