Skip to content

Commit

Permalink
[fix] - changes to manager class
Browse files Browse the repository at this point in the history
  • Loading branch information
iloElias committed Sep 29, 2024
1 parent 9070b36 commit 153f28e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/Abstract/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ abstract class Table extends \stdClass
{
use Sanitizable;

public static function getTableName(): string
public static function tableName(): string
{
return self::tableSanitizedName();
}
Expand All @@ -29,6 +29,15 @@ public static function getTableSchemaAddress(): string
return "\"{$tableSchema}\".\"{$tableName}\"";
}

final public static function tableFullAddress(): string
{
$reflection = new \ReflectionClass(static::class);
$schemaNamespace = explode('\\', $reflection->getProperty("schema")->getType()->getName());
$tableSchema = Utils::sanitizeForPostgres($schemaNamespace[array_key_last($schemaNamespace)]);
$tableName = self::tableSanitizedName();
return "\"{$tableSchema}\".\"{$tableName}\"";
}

public static function tableColumns(): array
{
$reflection = new \ReflectionClass(static::class);
Expand Down Expand Up @@ -65,7 +74,7 @@ final public static function tableIdentifier(): array
throw new Exception('No identifier found for table ' . static::tableFullAddress());
}

public static function getTableCreationInfo(): array
public static function tableCreationInfo(): array
{
return [
'tableName' => static::tableSanitizedName(),
Expand Down

0 comments on commit 153f28e

Please sign in to comment.