/** * @param string $schema * @param string $table */ public function describe(string $schema, string $table) { return parent::project($this->schema['column_name'], Table::call('IF')->with($this->schema['is_nullable']->eq('NO'), true, false)->as('nullable'), $this->schema['character_maximum_length']->as('length'), $this->schema['numeric_precision']->as('prec'), $this->schema['column_key']->as('ctype'), $this->schema['extra']->as('extra'))->where($this->schema['table_schema']->eq($schema)->and($this->schema['table_name']->eq($table))); }
public function visitTable(Table $table, Collector $collector) { if ($table->getSchema()) { $collector->append($this->quoteTableName($table->getSchema()))->append('.'); } if ($table->getAlias()) { return $collector->append($this->quoteTableName($table->getName()))->append(' ')->append($this->quoteTableName($table->getAlias())); } return $collector->append($this->quoteTableName($table->getName())); }