Apache Ignite C++ Client
Loading...
Searching...
No Matches
ignite::qualified_name Class Reference

#include <qualified_name.h>

Public Member Functions

const std::string & get_schema_name () const
const std::string & get_object_name () const
const std::string & get_canonical_name () const

Static Public Member Functions

static IGNITE_API qualified_name create (std::string_view schema_name, std::string_view object_name)
static IGNITE_API qualified_name parse (std::string_view simple_or_canonical_name)

Static Public Attributes

static IGNITE_API constexpr std::string_view DEFAULT_SCHEMA_NAME = sql_statement::DEFAULT_SCHEMA
static IGNITE_API constexpr char SEPARATOR_CHAR = '.'
static IGNITE_API constexpr char QUOTE_CHAR = '"'

Detailed Description

Represents a qualified name of a database object.

Schema name and object name should conform to SQL syntax rules for identifiers.

  • Identifier must start from any character in the Unicode General Category classes "Lu", "Ll", "Lt", "Lm", "Lo", or "Nl";
  • Identifier character (expect the first one) may be U+00B7 (middle dot), or any character in the Unicode General Category classes "Mn", "Mc", "Nd", "Pc", or "Cf";
  • Identifier that contains any other characters must be quoted with double-quotes;
  • Double-quote inside the identifier must be encoded as 2 consequent double-quote chars.

Member Function Documentation

◆ create()

qualified_name ignite::qualified_name::create ( std::string_view schema_name,
std::string_view object_name )
staticnodiscard

Create a new instance of a qualified_name class.

Parameters
schema_nameSchema name. If empty, the default schema name is assumed.
See also
DEFAULT_SCHEMA_NAME.
Parameters
object_nameObject name. Cannot be empty.
Returns
A new instance of a qualified_name class.

◆ get_canonical_name()

const std::string & ignite::qualified_name::get_canonical_name ( ) const
nodiscard

Gets a fully qualified name in canonical form, that is, enclosing each part of the identifier chain in double quotes if necessary.

Returns
A fully qualified name in canonical form.

◆ get_object_name()

const std::string & ignite::qualified_name::get_object_name ( ) const
inlinenodiscard

Gets the object name.

Returns
Object name.

◆ get_schema_name()

const std::string & ignite::qualified_name::get_schema_name ( ) const
inlinenodiscard

Gets the schema name.

Returns
schema name.

◆ parse()

qualified_name ignite::qualified_name::parse ( std::string_view simple_or_canonical_name)
staticnodiscard

Create a new instance of a qualified_name class from a string.

Parameters
simple_or_canonical_nameSimple or canonical name. Cannot be empty.
Returns
A new instance of a qualified_name class.

Member Data Documentation

◆ DEFAULT_SCHEMA_NAME

IGNITE_API constexpr std::string_view ignite::qualified_name::DEFAULT_SCHEMA_NAME = sql_statement::DEFAULT_SCHEMA
staticconstexpr

Default schema name.

◆ QUOTE_CHAR

IGNITE_API constexpr char ignite::qualified_name::QUOTE_CHAR = '"'
staticconstexpr

Quote character for identifiers.

◆ SEPARATOR_CHAR

IGNITE_API constexpr char ignite::qualified_name::SEPARATOR_CHAR = '.'
staticconstexpr

Separator character between schema and object names.


The documentation for this class was generated from the following files: