Class: PG::TextEncoder::Identifier
- Inherits:
-
SimpleEncoder
- Object
- SimpleEncoder
- PG::TextEncoder::Identifier
- Defined in:
- ext/pg_text_encoder.c
Overview
This is the encoder class for PostgreSQL identifiers.
An Array value can be used for identifiers of the kind “schema.table.column”. This ensures that each element is properly quoted:
PG::TextEncoder::Identifier.new.encode(['schema', 'table', 'column'])
=> '"schema"."table"."column"'
This encoder can also be used per PG::Connection#quote_ident .