Open imraan-go opened 2 years ago
Also type casting primitive types such as string,int is not really needed
PR is welcome :)
it tried to typecast it to some random type such as bigint,json etc.
The type is not random - that is the type Bun auto-discovered from the Go column.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. If there is no update within the next 7 days, this issue will be closed.
When using bulk() in NewUpdate(), bun tries to type cast all rows. But in postrgresql, type casting only the first column is enough. Also type casting primitive types such as string,int is not really needed. Here is an example query produced by bun:
This query can be shortened to:
Also when bun doesn't recognize a type, it tried to typecast it to some random type such as bigint,json etc.