method getRawCreate documentation in bbn\Db\Languages\Pgsql

function(string $table) { if ($table = $this->tableFullName($table, true)){ if ($r = $this->rawQuery(<< 0 AND STRPOS(data_type, 'int') > 0 THEN REPLACE(REPLACE(data_type, 'integer', 'serial'), 'int', 'serial') ELSE data_type END || coalesce('(' || character_maximum_length || ')', '') || CASE WHEN STRPOS(data_type, 'int') = 0 AND numeric_precision IS NOT NULL AND numeric_scale IS NOT NUll THEN '(' || numeric_precision || ',' || numeric_scale || ')' ELSE '' END || CASE WHEN is_nullable = 'YES' THEN '' ELSE ' NOT NULL' END || CASE WHEN STRPOS(column_default, 'nextval') > 0 AND STRPOS(data_type, 'int') > 0 THEN '' ELSE coalesce(' DEFAULT ' || column_default || ' ', '') END AS column_expr FROM information_schema.columns WHERE table_schema = 'public' AND table_name = '$table' ORDER BY ordinal_position) column_list; PGSQL ) ) { return $r->fetch(\PDO::FETCH_ASSOC)['create_table'] ?? ''; } } return ''; }

BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.