Bläddra i källkod

Update 'src/ORM/DBInstance.php'

ahwelp 5 år sedan
förälder
incheckning
35b4be28d1
1 ändrade filer med 27 tillägg och 1 borttagningar
  1. 27 1
      src/ORM/DBInstance.php

+ 27 - 1
src/ORM/DBInstance.php

@@ -22,6 +22,9 @@ class DBInstance {
      * Execute
      *
      * 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
@@ -36,7 +39,11 @@ class DBInstance {
             $con->exec($sql);
         }
     }
-
+    
+    /*
+     *
+     * @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