diff --git a/core/.cspell.json b/core/.cspell.json index 0a4a3fd76b..6f26c92c2e 100644 --- a/core/.cspell.json +++ b/core/.cspell.json @@ -7,6 +7,7 @@ "assets/vendor/**", "lib/Drupal/Component/Diff/**", "lib/Drupal/Component/Transliteration/data/**", + "lib/Drupal/Core/Database/Driver/pgsql/Schema.php", "lib/Drupal/Core/File/MimeType/ExtensionMimeTypeGuesser.php", "modules/**/Migrate*Test.php", "modules/color/preview.html", diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php index f9085f7209..6cf476414d 100644 --- a/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php +++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php @@ -133,7 +133,6 @@ public function queryTableInformation($table) { // of the attribute ID, and the default value must be extracted from the // node tree for the attribute definition instead of the historical // human-readable column, adsrc. - // cSpell:disable $sql = <<<'EOD' SELECT pg_attribute.attname AS column_name, format_type(pg_attribute.atttypid, pg_attribute.atttypmod) AS data_type, pg_get_expr(pg_attrdef.adbin, pg_attribute.attrelid) AS column_default FROM pg_attribute @@ -144,7 +143,6 @@ public function queryTableInformation($table) { AND (format_type(pg_attribute.atttypid, pg_attribute.atttypmod) = 'bytea' OR pg_get_expr(pg_attrdef.adbin, pg_attribute.attrelid) LIKE 'nextval%') EOD; - // cSpell:enable $result = $this->connection->query($sql, [ ':key' => $key, ]); @@ -187,7 +185,6 @@ public function queryTableInformation($table) { */ protected function getTempNamespaceName() { if (!isset($this->tempNamespaceName)) { - // cSpell:disable-next-line $this->tempNamespaceName = $this->connection->query('SELECT nspname FROM pg_namespace WHERE oid = pg_my_temp_schema()')->fetchField(); } return $this->tempNamespaceName; @@ -242,7 +239,6 @@ public function queryFieldInformation($table, $field, $constraint_type = 'c') { $this->connection->addSavepoint(); try { - // cSpell:disable-next-line $checks = $this->connection->query("SELECT conname FROM pg_class cl INNER JOIN pg_constraint co ON co.conrelid = cl.oid INNER JOIN pg_attribute attr ON attr.attrelid = cl.oid AND attr.attnum = ANY (co.conkey) INNER JOIN pg_namespace ns ON cl.relnamespace = ns.oid WHERE co.contype = :constraint_type AND ns.nspname = :schema AND cl.relname = :table AND attr.attname = :column", [ ':constraint_type' => $constraint_type, ':schema' => $schema, @@ -496,7 +492,6 @@ protected function createPrimaryKeySql($fields) { public function tableExists($table) { $prefixInfo = $this->getPrefixInfo($table, TRUE); - // cSpell:disable-next-line return (bool) $this->connection->query("SELECT 1 FROM pg_tables WHERE schemaname = :schema AND tablename = :table", [':schema' => $prefixInfo['schema'], ':table' => $prefixInfo['table']])->fetchField(); } @@ -511,7 +506,6 @@ public function findTables($table_expression) { // Load all the tables up front in order to take into account per-table // prefixes. The actual matching is done at the bottom of the method. - // cSpell:disable-next-line $results = $this->connection->query("SELECT tablename FROM pg_tables WHERE schemaname = :schema", [':schema' => $this->defaultSchema]); foreach ($results as $table) { // Take into account tables that have an individual prefix. @@ -564,7 +558,6 @@ public function renameTable($table, $new_name) { // Index names and constraint names are global in PostgreSQL, so we need to // rename them when renaming the table. - // cSpell:disable-next-line $indexes = $this->connection->query('SELECT indexname FROM pg_indexes WHERE schemaname = :schema AND tablename = :table', [':schema' => $old_schema, ':table' => $old_table_name]); foreach ($indexes as $index) { @@ -709,7 +702,6 @@ public function dropField($table, $field) { public function fieldExists($table, $column) { $prefixInfo = $this->getPrefixInfo($table); - // cSpell:disable-next-line return (bool) $this->connection->query("SELECT 1 FROM pg_attribute WHERE attrelid = :key::regclass AND attname = :column AND NOT attisdropped AND attnum > 0", [':key' => $prefixInfo['schema'] . '.' . $prefixInfo['table'], ':column' => $column])->fetchField(); } @@ -791,7 +783,6 @@ protected function findPrimaryKeyColumns($table) { if (!$this->tableExists($table)) { return FALSE; } - // cSpell:disable-next-line return $this->connection->query("SELECT array_position(i.indkey, a.attnum) AS position, a.attname FROM pg_index i JOIN pg_attribute a ON a.attrelid = i.indrelid AND a.attnum = ANY(i.indkey) WHERE i.indrelid = '{" . $table . "}'::regclass AND i.indisprimary ORDER BY position")->fetchAllKeyed(); } @@ -867,7 +858,6 @@ protected function introspectIndexSchema($table) { // Get the schema and tablename for the table without identifier quotes. $full_name = str_replace('"', '', $this->connection->prefixTables('{' . $table . '}')); - // cSpell:disable-next-line $result = $this->connection->query("SELECT i.relname AS index_name, a.attname AS column_name FROM pg_class t, pg_class i, pg_index ix, pg_attribute a WHERE t.oid = ix.indrelid AND i.oid = ix.indexrelid AND a.attrelid = t.oid AND a.attnum = ANY(ix.indkey) AND t.relkind = 'r' AND t.relname = :table_name ORDER BY index_name ASC, column_name ASC", [ ':table_name' => $full_name, ])->fetchAll(); @@ -1033,11 +1023,9 @@ public function getComment($table, $column = NULL) { $info = $this->getPrefixInfo($table); // Don't use {} around pg_class, pg_attribute tables. if (isset($column)) { - // cSpell:disable-next-line return $this->connection->query('SELECT col_description(oid, attnum) FROM pg_class, pg_attribute WHERE attrelid = oid AND relname = ? AND attname = ?', [$info['table'], $column])->fetchField(); } else { - // cSpell:disable-next-line return $this->connection->query('SELECT obj_description(oid, ?) FROM pg_class WHERE relname = ?', ['pg_class', $info['table']])->fetchField(); } } diff --git a/core/misc/cspell/dictionary.txt b/core/misc/cspell/dictionary.txt index 40e5c54e34..4912521a00 100644 --- a/core/misc/cspell/dictionary.txt +++ b/core/misc/cspell/dictionary.txt @@ -10,15 +10,11 @@ accesslog accum actionid adamson -adbin addedline addtogroup admin's adminforms adminlabel -adnum -adrelid -adsrc aewesome aflopend afterbegin @@ -123,6 +119,7 @@ autoloaded autoloader autoloaders autoloading +autop autoplay autoreply autosave @@ -172,7 +169,6 @@ bgcolor bgred bgsound bigpipe -bigserial bikeshed bikesheds bing @@ -333,6 +329,7 @@ configurability configurator confirm's conformant +conname conneg constucts contant @@ -346,7 +343,6 @@ contextuals contrained contribs controlgroup -contype coord copmplete corefake @@ -549,7 +545,6 @@ elit embed's emebd emptry -emtity emtpy encapsed encoding's @@ -648,7 +643,6 @@ filestorage filesystems filetransfer filevalidationerror -fillfactor filterprovider filtertypes findwith @@ -794,6 +788,7 @@ hreflang hrefs htaccess htkey +htmlcorrector htmls htmlto httpd @@ -883,7 +878,6 @@ janvier javascripts jcbfyr jessebeach -jkro jnoub johansson johndoe @@ -956,7 +950,6 @@ linkback linkgenerator linkification linksby -linktitle lisu litererally livescript @@ -1228,13 +1221,11 @@ nplurals npoll nprofile nresponse -nspname nstrings nsync ntaxonomy ntfs nturn -nullaction nyan nyancat nyans