-
Notifications
You must be signed in to change notification settings - Fork 241
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
Fix EZP-26209: Textline legacy search indexing causes TransactionError #1338
Conversation
@andrerom I create the PR without your nitpic. |
+1, but @alongosz; any input on if the max and min is within what most SQL engines support (given this is on generic interface). |
lib/ezdb/classes/ezdbinterface.php
Outdated
* | ||
* @var int | ||
*/ | ||
public $MAX_INT = 2147483647; |
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.
Seems like most reasonable limit supported by every DBMS out-of-the-box.
However these should be constants IMHO // cc @andrerom
@alongosz I changed it to constants |
It's probably OK to use |
@pkamps I wouldn't recommend overriding it at all as it would cause issues for data migrations between systems. But if you really want to override it later, then property is also bad choice because those values are constant with respect to DBMS, not db handler instance. In this case introducing a method, e.g. |
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.
+1, but @pkamps are you fine with this? As stated above different lengths depending on sql engine will be an issue as well that blows up the complexity (for data migrations) vs use here as far as I can see.
+1 |
If going for a const, I vote for naming it MAX_INT_32BIT, so that it is slightly more clear what is intended purpose and origin are. Fe. it makes it easier to add later MAX_INT_64BIT and have code which uses the latter... As a complement of info
|
Alternative to #1268