-
Notifications
You must be signed in to change notification settings - Fork 48
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
Utopia\Database\Adapter::getIntLimit()
is not enforced
#94
Comments
I think there is another Issue here the size is the length of the coumn , like size 6 = 100000 digits for unsigned value. like string 64 meaning 64 chars length. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Each adapter must implement the
getIntLimit()
method, but it isn't enforced due to how we interpret$size
for integer attributes.In the case of strings,
$size
is pretty obvious - the length of the string. However, for integers (and before BIGINT), we just set$size = 0
, so this check increateAttribute()
would never actually prevent PDO from throwing the database exception:database/src/Database/Database.php
Lines 433 to 437 in af512b7
Options to enforce int limit:
getIntLimit()
as a filter when creating/updating documentsUtopia\Database
exceptionThe text was updated successfully, but these errors were encountered: