function Connection::hasJson
Same name in this branch
- 11.x core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::hasJson()
Same name in other branches
- 9 core/modules/pgsql/src/Driver/Database/pgsql/Connection.php \Drupal\pgsql\Driver\Database\pgsql\Connection::hasJson()
- 9 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::hasJson()
- 10 core/modules/pgsql/src/Driver/Database/pgsql/Connection.php \Drupal\pgsql\Driver\Database\pgsql\Connection::hasJson()
- 10 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::hasJson()
Overrides Connection::hasJson
File
-
core/
modules/ pgsql/ src/ Driver/ Database/ pgsql/ Connection.php, line 405
Class
- Connection
- PostgreSQL implementation of \Drupal\Core\Database\Connection.
Namespace
Drupal\pgsql\Driver\Database\pgsqlCode
public function hasJson() : bool {
try {
return (bool) $this->query('SELECT JSON_TYPEOF(\'1\')');
} catch (\Exception) {
return FALSE;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.