function Connection::hasJson
Runs a simple query to validate json datatype support.
Return value
bool Returns the query result.
Overrides Connection::hasJson
File
- 
              core/modules/ pgsql/ src/ Driver/ Database/ pgsql/ Connection.php, line 447 
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 $e) {
    return FALSE;
  }
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
