Skip to content
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

Add PHPDoc about boolean values in scalar() and queryScalar() #918

Merged
merged 1 commit into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Command/CommandInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,8 @@ public function queryOne(): array|null;

/**
* Execute the SQL statement and returns the value of the first column in the first row of data.
*
* This method is best used when you need only a single value.
* Do not use this method for `boolean` values as it returns `false` if there is no value.
*
* @throws Exception
* @throws Throwable If execution failed.
Expand Down
2 changes: 1 addition & 1 deletion src/Query/QueryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ public function prepare(QueryBuilderInterface $builder): self;

/**
* Returns the query results as a scalar value.
*
* The value returned will be the first column in the first row of the query results.
* Do not use this method for `boolean` values as it returns `false` if the query result is empty.
*
* @throws Exception
* @throws InvalidConfigException
Expand Down
Loading