mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Add template types to PreparedQuery
This commit is contained in:
parent
630901044e
commit
64e26f8d6f
@ -200,26 +200,6 @@ parameters:
|
||||
count: 3
|
||||
path: system/Database/MySQLi/PreparedQuery.php
|
||||
|
||||
-
|
||||
message: "#^Cannot call method bind_param\\(\\) on object\\|resource\\.$#"
|
||||
count: 1
|
||||
path: system/Database/MySQLi/PreparedQuery.php
|
||||
|
||||
-
|
||||
message: "#^Cannot call method execute\\(\\) on object\\|resource\\.$#"
|
||||
count: 1
|
||||
path: system/Database/MySQLi/PreparedQuery.php
|
||||
|
||||
-
|
||||
message: "#^Cannot call method get_result\\(\\) on object\\|resource\\.$#"
|
||||
count: 1
|
||||
path: system/Database/MySQLi/PreparedQuery.php
|
||||
|
||||
-
|
||||
message: "#^Cannot call method close\\(\\) on object\\|resource\\.$#"
|
||||
count: 1
|
||||
path: system/Database/MySQLi/PreparedQuery.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$field_count on object\\|resource\\|false\\.$#"
|
||||
count: 1
|
||||
@ -315,16 +295,6 @@ parameters:
|
||||
count: 1
|
||||
path: system/Database/SQLite3/Connection.php
|
||||
|
||||
-
|
||||
message: "#^Cannot call method bindValue\\(\\) on object\\|resource\\.$#"
|
||||
count: 1
|
||||
path: system/Database/SQLite3/PreparedQuery.php
|
||||
|
||||
-
|
||||
message: "#^Cannot call method execute\\(\\) on object\\|resource\\.$#"
|
||||
count: 1
|
||||
path: system/Database/SQLite3/PreparedQuery.php
|
||||
|
||||
-
|
||||
message: "#^Cannot call method lastErrorCode\\(\\) on bool\\|object\\|resource\\.$#"
|
||||
count: 1
|
||||
@ -340,11 +310,6 @@ parameters:
|
||||
count: 1
|
||||
path: system/Database/SQLite3/PreparedQuery.php
|
||||
|
||||
-
|
||||
message: "#^Cannot call method close\\(\\) on object\\|resource\\.$#"
|
||||
count: 1
|
||||
path: system/Database/SQLite3/PreparedQuery.php
|
||||
|
||||
-
|
||||
message: "#^Cannot call method columnName\\(\\) on object\\|resource\\|false\\.$#"
|
||||
count: 2
|
||||
|
@ -19,6 +19,8 @@ use ErrorException;
|
||||
|
||||
/**
|
||||
* Base prepared query
|
||||
*
|
||||
* @template TStatement of object|resource
|
||||
*/
|
||||
abstract class BasePreparedQuery implements PreparedQueryInterface
|
||||
{
|
||||
@ -26,6 +28,7 @@ abstract class BasePreparedQuery implements PreparedQueryInterface
|
||||
* The prepared statement itself.
|
||||
*
|
||||
* @var object|resource|null
|
||||
* @phpstan-var TStatement|null
|
||||
*/
|
||||
protected $statement;
|
||||
|
||||
|
@ -14,9 +14,12 @@ namespace CodeIgniter\Database\MySQLi;
|
||||
use BadMethodCallException;
|
||||
use CodeIgniter\Database\BasePreparedQuery;
|
||||
use CodeIgniter\Database\Exceptions\DatabaseException;
|
||||
use mysqli_stmt;
|
||||
|
||||
/**
|
||||
* Prepared query for MySQLi
|
||||
*
|
||||
* @extends BasePreparedQuery<mysqli_stmt>
|
||||
*/
|
||||
class PreparedQuery extends BasePreparedQuery
|
||||
{
|
||||
|
@ -18,6 +18,8 @@ use CodeIgniter\Database\PreparedQueryInterface;
|
||||
|
||||
/**
|
||||
* Prepared query for OCI8
|
||||
*
|
||||
* @extends BasePreparedQuery<resource>
|
||||
*/
|
||||
class PreparedQuery extends BasePreparedQuery implements PreparedQueryInterface
|
||||
{
|
||||
|
@ -18,6 +18,8 @@ use Exception;
|
||||
|
||||
/**
|
||||
* Prepared query for Postgre
|
||||
*
|
||||
* @extends BasePreparedQuery<\PgSql\Result>
|
||||
*/
|
||||
class PreparedQuery extends BasePreparedQuery
|
||||
{
|
||||
|
@ -18,6 +18,8 @@ use Exception;
|
||||
|
||||
/**
|
||||
* Prepared query for Postgre
|
||||
*
|
||||
* @extends BasePreparedQuery<resource>
|
||||
*/
|
||||
class PreparedQuery extends BasePreparedQuery
|
||||
{
|
||||
|
@ -14,9 +14,12 @@ namespace CodeIgniter\Database\SQLite3;
|
||||
use BadMethodCallException;
|
||||
use CodeIgniter\Database\BasePreparedQuery;
|
||||
use CodeIgniter\Database\Exceptions\DatabaseException;
|
||||
use SQLite3Stmt;
|
||||
|
||||
/**
|
||||
* Prepared query for SQLite3
|
||||
*
|
||||
* @extends BasePreparedQuery<SQLite3Stmt>
|
||||
*/
|
||||
class PreparedQuery extends BasePreparedQuery
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user