-
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #462: Add Generated Fields option into ORM Schema
- Loading branch information
Showing
31 changed files
with
705 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Cycle\ORM\Schema; | ||
|
||
/** | ||
* Values for {@see SchemaInterface::GENERATED_FIELDS} | ||
*/ | ||
final class GeneratedField | ||
{ | ||
/** | ||
* Field value is generated in the user space before transaction running. | ||
*/ | ||
public const DEFAULT = 0; | ||
|
||
/** | ||
* Field value is generated by PHP code before Insert command running | ||
* like with `CreatedAt` or `Uuid` Entity Behaviors | ||
* | ||
* @link https://github.com/cycle/entity-behavior | ||
* @link https://github.com/cycle/entity-behavior-uuid | ||
*/ | ||
public const BEFORE_INSERT = 1; | ||
|
||
/** | ||
* Field value is generated by the Database. | ||
* It is: autoincrement fields, sequences, timestamps, etc. | ||
*/ | ||
public const ON_INSERT = 2; | ||
|
||
/** | ||
* Field value is generated by PHP code before Update command running like with `UpdatedAt` Entity Behavior. | ||
* | ||
* @link https://github.com/cycle/entity-behavior | ||
*/ | ||
public const BEFORE_UPDATE = 4; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.