`; PostgreSQL only) * * @param string $tableName The name of the table in which document existence should be determined * @param array|object $criteria The criteria for the JSON containment query * @return bool True if any documents match the JSON containment query, false if not * @throws DocumentException If the database mode is not PostgreSQL, or if an error occurs */ public static function byContains(string $tableName, array|object $criteria): bool { return Custom::scalar(Query\Exists::byContains($tableName), Parameters::json(':criteria', $criteria), new ExistsMapper()); } /** * Determine if documents exist by a JSON Path match query (`@?`; PostgreSQL only) * * @param string $tableName The name of the table in which document existence should be determined * @param string $path The JSON Path match string * @return bool True if any documents match the JSON Path string, false if not * @throws DocumentException If the database mode is not PostgreSQL, or if an error occurs */ public static function byJsonPath(string $tableName, string $path): bool { return Custom::scalar(Query\Exists::byJsonPath($tableName), [':path' => $path], new ExistsMapper()); } }