Skip to content

Commit b9dcfe5

Browse files
committed
move docblock to interface
1 parent 382230f commit b9dcfe5

File tree

2 files changed

+22
-19
lines changed

2 files changed

+22
-19
lines changed

shared/ezQuery.php

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -686,25 +686,6 @@ private function create_schema(array ...$columnDataOptions)
686686
return false;
687687
}
688688

689-
/**
690-
* Creates an database table and columns, by either:
691-
* - array( column, datatype, ...value/options arguments ) // calls create_schema()
692-
* - column( column, datatype, ...value/options arguments ) // returns string
693-
* - primary( primary_key_label, ...primaryKeys) // returns string
694-
* - foreign( foreign_key_label, ...foreignKeys) // returns string
695-
* - unique( unique_key_label, ...uniqueKeys) // returns string
696-
*
697-
* @param string $table, - The name of the db table that you wish to create
698-
* @param mixed $schemas, - An array of:
699-
*
700-
* @param string $column|CONSTRAINT, - column name/CONSTRAINT usage for PRIMARY|FOREIGN KEY
701-
* @param string $type|$constraintName, - data type for column/primary|foreign constraint name
702-
* @param mixed $size|...$primaryForeignKeys,
703-
* @param mixed $value, - column should be NULL or NOT NULL. If omitted, assumes NULL
704-
* @param mixed $default - Optional. It is the value to assign to the column
705-
*
706-
* @return mixed results of query() call
707-
*/
708689
public function create(string $table = null, ...$schemas)
709690
{
710691
$vendor = ezSchema::vendor();
@@ -768,6 +749,7 @@ public function create(string $table = null, ...$schemas)
768749
return false;
769750
}
770751

752+
// todo not finish, not tested
771753
public function alter(string $table = null, ...$schemas)
772754
{
773755
if (empty($table) || empty($schemas))

shared/ezQueryInterface.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,4 +393,25 @@ public function insert($table = '', $keyAndValue);
393393
* @return mixed bool/id of inserted record, or false for error
394394
*/
395395
public function insert_select($toTable = '', $toColumns = '*', $fromTable = null, $fromColumns = '*', ...$fromWhere);
396+
397+
/**
398+
* Creates an database table and columns, by either:
399+
* - array( column, datatype, ...value/options arguments ) // calls create_schema()
400+
* - column( column, datatype, ...value/options arguments ) // returns string
401+
* - primary( primary_key_label, ...primaryKeys) // returns string
402+
* - foreign( foreign_key_label, ...foreignKeys) // returns string
403+
* - unique( unique_key_label, ...uniqueKeys) // returns string
404+
*
405+
* @param string $table, - The name of the db table that you wish to create
406+
* @param mixed $schemas, - An array of:
407+
*
408+
* @param string $column|CONSTRAINT, - column name/CONSTRAINT usage for PRIMARY|FOREIGN KEY
409+
* @param string $type|$constraintName, - data type for column/primary|foreign constraint name
410+
* @param mixed $size|...$primaryForeignKeys,
411+
* @param mixed $value, - column should be NULL or NOT NULL. If omitted, assumes NULL
412+
* @param mixed $default - Optional. It is the value to assign to the column
413+
*
414+
* @return mixed results of query() call
415+
*/
416+
public function create(string $table = null, ...$schemas);
396417
}

0 commit comments

Comments
 (0)