This commit is contained in:
2020-10-29 18:17:25 +08:00
parent 6839b64be8
commit 53ae43b79b
198 changed files with 708 additions and 850 deletions
+31 -7
View File
@@ -6,6 +6,8 @@
* Time: 17:22
*/
declare(strict_types=1);
namespace Database\Mysql;
@@ -21,20 +23,42 @@ use Snowflake\Core\JSON;
class Columns extends Component
{
private $columns = [];
/**
* @var array
* field types
*/
private array $columns = [];
/** @var Connection $db */
public $db;
public $table = '';
private $_primary = [];
private $_auto_increment = [];
/**
* @var Connection
* Mysql client
*/
public Connection $db;
/**
* @var string
* tableName
*/
public string $table = '';
/**
* @var array
* field primary key
*/
private array $_primary = [];
/**
* @var array
* by mysql field auto_increment
*/
private array $_auto_increment = [];
/**
* @param string $table
* @return $this
* @throws Exception
*/
public function table($table)
public function table(string $table)
{
return $this->structure($this->table = $table);
}
+1 -1
View File
@@ -1,5 +1,5 @@
<?php
declare(strict_types=1);
namespace Database\Mysql;