WIP on docs and added basic enums supports

This commit is contained in:
mcndave committed 2023-01-14 02:19:42 +00:00
1 parent 497fe5547b
commit b6752f4364
22 files changed
+367 -35

No files matched your search

+48
View File
@@ -0,0 +1,48 @@
<?php
namespace Ulmus\Entity\Sqlite;
use Ulmus\EntityCollection;
/**
* @Table
*/
class Column
{
use \Ulmus\EntityTrait;
/**
* @Id
*/
public int $cid;
/**
* @Field
*/
public string $type;
/**
* @Field
*/
public string $name;
/**
* @Virtual
*/
public string $tableName;
/**
* @Field('name' => "notnull")
*/
public bool $notNull;
/**
* @Field('name' => 'dflt_value')
*/
public ? string $defaultValue;
/**
* @Field('name' => "pk")
*/
public bool $primaryKey;
}
+3 -2
View File
@@ -2,13 +2,14 @@
namespace Ulmus\Entity\Sqlite;
use Ulmus\ConnectionAdapter;
use Ulmus\Repository;
class Table extends Schema
{
public static function repository(string $alias = Repository::DEFAULT_ALIAS): Repository
public static function repository(string $alias = Repository::DEFAULT_ALIAS, ConnectionAdapter $adapter = null): Repository
{
return new class(static::class, $alias) extends Repository\SqliteRepository
return new class(static::class, $alias, $adapter) extends Repository\SqliteRepository
{
public function finalizeQuery(): void
{