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
IIUC, the Column<ByteArray> type is mapped to PostgreSQL's bytea column type. It is variable length and does not even have a length attribute. In Exposed, however I'm required to provide a length as parameter:
val data: Column<ByteArray> = binary("data", <length-parameter>)
which is then ignored, because I can insert ByteArrays with a longer value than specified, at least in Batch Insert. This is all quite confusing for me.
Suggestions:
make it an optional parameter. (other dialects also don't always require you to specify a length.)
if specified, validate the data before passing it to the database? (not sure if this is what you want in Exposed, but it seems reasonable as it also validates the type.)
if specified, either
produce a log statement that the length specifier is not enforced/handled by this dialect. OR
set a CHECK constraint to enforce the maximum length in the database
The text was updated successfully, but these errors were encountered:
IIUC, the
Column<ByteArray>
type is mapped to PostgreSQL'sbytea
column type. It is variable length and does not even have a length attribute. In Exposed, however I'm required to provide a length as parameter:which is then ignored, because I can insert
ByteArray
s with a longer value than specified, at least in Batch Insert. This is all quite confusing for me.Suggestions:
The text was updated successfully, but these errors were encountered: