Text Search Objects¶
The textsearch
module defines eight classes: classes
TSConfiguration
, TSDictionary
, TSParser
and
TSTemplate
derived from DbSchemaObject
, and classes
TSConfigurationDict
, TSDictionaryDict
,
TSParserDict
and TSTemplateDict
derived from
DbObjectDict
.
Text Search Configuration¶
TSConfiguration
is derived from DbSchemaObject
and
represents a Postgres text search configuration.
-
class
pyrseas.dbobject.textsearch.
TSConfiguration
(name, schema, description, owner, parser, oid=None)¶ A text search configuration definition
-
TSConfiguration.
to_map
(db, no_owner)¶ Convert a text search configuration to a YAML-suitable format
Returns: dictionary
-
TSConfiguration.
create
(dbversion=None)¶ Return SQL statements to CREATE the configuration
Returns: SQL statements
Text Search Configuration Dictionary¶
TSConfigurationDict
is derived from
DbObjectDict
. It is a dictionary that
represents the collection of text search configurations in a database.
-
class
pyrseas.dbobject.textsearch.
TSConfigurationDict
(dbconn=None)¶ The collection of text search configurations in a database
-
TSConfigurationDict.
from_map
(schema, inconfigs)¶ Initialize the dictionary of configs by examining the input map
Parameters: - schema – schema owning the configurations
- inconfigs – input YAML map defining the configurations
Text Search Dictionary¶
TSDictionary
is derived from DbSchemaObject
and
represents a Postgres text search dictionary.
-
class
pyrseas.dbobject.textsearch.
TSDictionary
(name, schema, description, owner, template, options, oid=None)¶ A text search dictionary definition
-
TSDictionary.
create
(dbversion=None)¶ Return SQL statements to CREATE the dictionary
Returns: SQL statements
Text Search Dictionary Dictionary¶
TSDictionaryDict
is derived from
DbObjectDict
. It is a Python dictionary
that represents the collection of text search dictionaries in a
database.
-
class
pyrseas.dbobject.textsearch.
TSDictionaryDict
(dbconn=None)¶ The collection of text search dictionaries in a database
-
TSDictionaryDict.
from_map
(schema, indicts)¶ Initialize the dictionary of dictionaries by examining the input map
Parameters: - schema – schema owning the dictionaries
- indicts – input YAML map defining the dictionaries
Text Search Parser¶
TSParser
is derived from DbSchemaObject
and
represents a Postgres text search parser.
-
class
pyrseas.dbobject.textsearch.
TSParser
(name, schema, description, start, gettoken, end, headline, lextypes, oid=None)¶ A text search parser definition
-
TSParser.
create
(dbversion=None)¶ Return SQL statements to CREATE the parser
Returns: SQL statements
Text Search Parser Dictionary¶
TSParserDict
is derived from
DbObjectDict
. It is a dictionary that
represents the collection of text search parsers in a database.
-
class
pyrseas.dbobject.textsearch.
TSParserDict
(dbconn=None)¶ The collection of text search parsers in a database
-
TSParserDict.
from_map
(schema, inparsers)¶ Initialize the dictionary of parsers by examining the input map
Parameters: - schema – schema owning the parsers
- inparsers – input YAML map defining the parsers
Text Search Template¶
TSTemplate
is derived from DbSchemaObject
and
represents a Postgres text search template.
-
class
pyrseas.dbobject.textsearch.
TSTemplate
(name, schema, description, init, lexize, oid=None)¶ A text search template definition
-
TSTemplate.
create
(dbversion=None)¶ Return SQL statements to CREATE the template
Returns: SQL statements
Text Search Template Dictionary¶
TSTemplateDict
is derived from
DbObjectDict
. It is a dictionary that
represents the collection of text search templates in a database.
-
class
pyrseas.dbobject.textsearch.
TSTemplateDict
(dbconn=None)¶ The collection of text search templates in a database
-
TSTemplateDict.
from_map
(schema, intemplates)¶ Initialize the dictionary of templates by examining the input map
Parameters: - schema – schema owning the templates
- intemplates – input YAML map defining the templates