Skip to content

add INT8 to isNumber method #2018

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

abolfazl-esmaeeli
Copy link

No description provided.

@abolfazl-esmaeeli
Copy link
Author

add INT8 to isNumber method

add microtime for primary key
@smhg
Copy link
Contributor

smhg commented Apr 30, 2025

Someone needs to confirm, but INT8 seems to be a valid Postgres type.
Thank you @abolfazl-esmaeeli.

Can you please rebase you PR and look at the changes in the review? Thanks!

@@ -12,6 +12,9 @@ public function preSave(?ConnectionInterface $con = null): bool
return parent::preSave($con);
}
<?php endif?>
if ($this->isNew() && !$this->getId()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 3 lines seem to have been added to your commit by mistake. If so, can you please remove it?

@@ -777,7 +777,7 @@ public function isString(string $type): bool
*/
public function isNumber(string $type): bool
{
$numbers = ['INTEGER', 'INT4', 'INT2', 'NUMBER', 'NUMERIC', 'SMALLINT', 'BIGINT', 'DECIMAL', 'REAL', 'DOUBLE PRECISION', 'SERIAL', 'BIGSERIAL'];
$numbers = ['INTEGER', 'INT4', 'INT2','INT8', 'NUMBER', 'NUMERIC', 'SMALLINT', 'BIGINT', 'DECIMAL', 'REAL', 'DOUBLE PRECISION', 'SERIAL', 'BIGSERIAL'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a space before 'INT8' (like the other values have)? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants