Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
94d5321e
Unverified
Commit
94d5321e
authored
Jun 05, 2020
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add rowCount() to the Result interface
parent
cc5bbd01
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
ArrayStatement.php
lib/Doctrine/DBAL/Cache/ArrayStatement.php
+9
-1
Result.php
lib/Doctrine/DBAL/Driver/Result.php
+11
-0
No files found.
lib/Doctrine/DBAL/Cache/ArrayStatement.php
View file @
94d5321e
...
...
@@ -48,11 +48,19 @@ class ArrayStatement implements IteratorAggregate, ResultStatement, Result
*/
public
function
closeCursor
()
{
unset
(
$this
->
data
)
;
$this
->
data
=
[]
;
return
true
;
}
/**
* {@inheritdoc}
*/
public
function
rowCount
()
{
return
count
(
$this
->
data
);
}
/**
* {@inheritdoc}
*/
...
...
lib/Doctrine/DBAL/Driver/Result.php
View file @
94d5321e
...
...
@@ -63,6 +63,17 @@ interface Result
*/
public
function
fetchFirstColumn
()
:
array
;
/**
* Returns the number of rows affected by the DELETE, INSERT, or UPDATE statement that produced the result.
*
* If the statement executed a SELECT query or a similar platform-specific SQL (e.g. DESCRIBE, SHOW, etc.),
* some database drivers may return the number of rows returned by that query. However, this behaviour
* is not guaranteed for all drivers and should not be relied on in portable applications.
*
* @return int The number of rows.
*/
public
function
rowCount
();
/**
* Returns the number of columns in the result
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment