Version 0.9.5 beta - Core update added autocomplete through the IDb interface, the DB factory now also supports autocomplete.
This commit is contained in:
@@ -43,6 +43,15 @@ abstract class Db implements IDb
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* will return the last inserted id of the given table
|
||||
* @return int
|
||||
*/
|
||||
public function lastInsertId()
|
||||
{
|
||||
return Pdo::getLastInsertedID();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $user_name
|
||||
* @return mixed
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<?php
|
||||
namespace Nibiru\Factory;
|
||||
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: kasdorf
|
||||
* Date: 10.11.17
|
||||
* Time: 09:24
|
||||
*/
|
||||
use Nibiru\Adapter\IDb;
|
||||
|
||||
class Db
|
||||
{
|
||||
const DATABASE_DRIVER_NS = "driver";
|
||||
@@ -17,10 +18,10 @@ class Db
|
||||
* all database functionallity has to be run trough this
|
||||
* factory
|
||||
* @param string $modelName
|
||||
* @return null
|
||||
* @return IDb
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function loadModel( $modelName = "")
|
||||
public static function loadModel( $modelName = ""): IDb
|
||||
{
|
||||
try {
|
||||
if( $modelName != "" )
|
||||
|
||||
@@ -9,6 +9,26 @@ namespace Nibiru\Adapter;
|
||||
|
||||
interface IDb
|
||||
{
|
||||
/**
|
||||
* @desc updates a row by a given field and field where search value
|
||||
* @param false $wherefield
|
||||
* @param false $wherevalue
|
||||
* @param false $rowfield
|
||||
* @param false $rowvalue
|
||||
* @return mixed
|
||||
*/
|
||||
public function updateRowByFieldWhere( $wherefield = false, $wherevalue = false, $rowfield = false, $rowvalue = false );
|
||||
/**
|
||||
* will return the last inserted id of the given table
|
||||
* @return int
|
||||
*/
|
||||
public function lastInsertId();
|
||||
|
||||
/**
|
||||
* @desc Will load the given database table as an array
|
||||
* @return mixed
|
||||
*/
|
||||
public function loadTableAsArray();
|
||||
/**
|
||||
* @desc Has to select a given Rowset by the index ID of the table
|
||||
* @param bool $id
|
||||
|
||||
Reference in New Issue
Block a user