eee
This commit is contained in:
@@ -6,7 +6,6 @@ namespace Database\Base;
|
||||
|
||||
|
||||
use Database\ModelInterface;
|
||||
use Exception;
|
||||
|
||||
|
||||
/**
|
||||
@@ -16,6 +15,10 @@ use Exception;
|
||||
class CollectionIterator extends \ArrayIterator
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var ModelInterface|string
|
||||
*/
|
||||
private ModelInterface|string $model;
|
||||
|
||||
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Database\Base;
|
||||
|
||||
|
||||
use Database\Condition\BetweenCondition;
|
||||
use Database\Condition\InCondition;
|
||||
use Database\Condition\LikeCondition;
|
||||
use Database\Condition\LLikeCondition;
|
||||
use Database\Condition\MathematicsCondition;
|
||||
use Database\Condition\NotBetweenCondition;
|
||||
use Database\Condition\NotInCondition;
|
||||
use Database\Condition\NotLikeCondition;
|
||||
use Database\Condition\RLikeCondition;
|
||||
|
||||
/**
|
||||
* Class ConditionClassMap
|
||||
* @package Database\Base
|
||||
*/
|
||||
class ConditionClassMap
|
||||
{
|
||||
|
||||
public static array $conditionMap = [
|
||||
'IN' => [
|
||||
'class' => InCondition::class
|
||||
],
|
||||
'NOT IN' => [
|
||||
'class' => NotInCondition::class
|
||||
],
|
||||
'LIKE' => [
|
||||
'class' => LikeCondition::class
|
||||
],
|
||||
'NOT LIKE' => [
|
||||
'class' => NotLikeCondition::class
|
||||
],
|
||||
'LLike' => [
|
||||
'class' => LLikeCondition::class
|
||||
],
|
||||
'RLike' => [
|
||||
'class' => RLikeCondition::class
|
||||
],
|
||||
'EQ' => [
|
||||
'class' => MathematicsCondition::class,
|
||||
'type' => 'EQ'
|
||||
],
|
||||
'NEQ' => [
|
||||
'class' => MathematicsCondition::class,
|
||||
'type' => 'NEQ'
|
||||
],
|
||||
'GT' => [
|
||||
'class' => MathematicsCondition::class,
|
||||
'type' => 'GT'
|
||||
],
|
||||
'EGT' => [
|
||||
'class' => MathematicsCondition::class,
|
||||
'type' => 'EGT'
|
||||
],
|
||||
'LT' => [
|
||||
'class' => MathematicsCondition::class,
|
||||
'type' => 'LT'
|
||||
],
|
||||
'ELT' => [
|
||||
'class' => MathematicsCondition::class,
|
||||
'type' => 'ELT'
|
||||
],
|
||||
'BETWEEN' => BetweenCondition::class,
|
||||
'NOT BETWEEN' => NotBetweenCondition::class,
|
||||
];
|
||||
|
||||
}
|
||||
@@ -19,7 +19,6 @@ use Database\Collection;
|
||||
use Database\Connection;
|
||||
use Database\DatabasesProviders;
|
||||
use Database\ModelInterface;
|
||||
use Database\Mysql\Columns;
|
||||
use Database\Relation;
|
||||
use Database\SqlBuilder;
|
||||
use Exception;
|
||||
@@ -793,16 +792,6 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Columns
|
||||
* @throws
|
||||
*/
|
||||
public function getColumns(): Columns
|
||||
{
|
||||
return $this->getConnection()->getSchema()->getColumns()->table($this->getTable());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @return static
|
||||
|
||||
Reference in New Issue
Block a user