Update 'src/ORM/DBInstance.php'

This commit is contained in:
ahwelp
2020-04-16 02:03:00 +00:00
parent e48d5a8992
commit 35b4be28d1
+26
View File
@@ -23,6 +23,9 @@ class DBInstance {
*
* This method will execute a SQL on the database
*
* @ctag DBInstance::execute($sql);
* @ctag DBInstance::execute($sql, []);
*
* @param String $sql The SQL to be executed
* @param Array $data Pass the info to be replaced on the query_prepare
* @param String $instance Select the connection to execute
@@ -37,6 +40,10 @@ class DBInstance {
}
}
/*
*
* @ctag DBInstance::lastInsert();
*/
public static function lastInsert($instance = 'default') {
$con = Connections::getConnection($instance);
return $con->lastInsertId();
@@ -47,6 +54,9 @@ class DBInstance {
*
* This method will execute a SQL and return a pointer to the resultset
*
* @ctag DBInstance::query($sql);
* @ctag DBInstance::query($sql, []);
*
* @param String $sql The SQL to be executed
* @param Array $data Pass the info to be replaced on the query_prepare
* @param String $instance Select the connection to execute
@@ -67,6 +77,9 @@ class DBInstance {
/**
* queryOne
*
* @ctag DBInstance::queryOne($sql);
* @ctag DBInstance::queryOne($sql, []);
*
* This method will execute a SQL and return the first featches register
*
* @param String $sql The SQL to be executed
@@ -90,6 +103,10 @@ class DBInstance {
*
* This method will execute get a register from a table
*
* @ctag DBInstance::getRecord($table);
* @ctag DBInstance::getRecord($table, []);
* @ctag DBInstance::getRecord($table, [], []);
*
* @param String $table The table to be searched
* @param Array $data Pass the info to be replaced on the query_prepare
* @param Array $select Info to be put on the SELECT part of the query
@@ -135,6 +152,9 @@ class DBInstance {
*
* This method will get a record from the database using SQL
*
* @ctag DBInstance::getRecordSql($sql);
* @ctag DBInstance::getRecordSql($sql, []);
*
* @param String $sql The SQL to be executed
* @param Array $data Pass the info to be replaced on the query_prepare
* @param String $instance Select the connection to execute
@@ -157,6 +177,9 @@ class DBInstance {
*
* This method will get records from the database
*
* @ctag DBInstance::getRecords($table);
* @ctag DBInstance::getRecords($table, []);
*
* @param String $table The table to be searched
* @param Array $data Pass the info to be replaced on the query_prepare
* @param Array $select Info to be put on the SELECT part of the query
@@ -201,6 +224,9 @@ class DBInstance {
*
* This method will get records from the database
*
* @ctag DBInstance::getRecordsSql($sql);
* @ctag DBInstance::getRecordsSql($sql, []);
*
* @param String $sql The SQL to be executed
* @param Array $data Pass the info to be replaced on the query_prepare
* @param String $instance Select the connection to execute