UiText

class q2_sdk.hq.db.ui_text.UiTextRow[source]

Bases: RepresentationRowBase

Description: StringElement = 'Description'
Language: StringElement = 'Language'
ShortName: StringElement = 'ShortName'
TextValue: StringElement = 'TextValue'
UiTextElementID: IntElement = 'UiTextElementID'
UiTextID: IntElement = 'UiTextID'
UiSelectionID: IntElement = 'UiSelectionID'
ContainsMarkup: BoolElement = 'ContainsMarkup'
class q2_sdk.hq.db.ui_text.UiText(logger, hq_credentials=None, ret_table_obj=None)[source]

Bases: DbObject

Programmatic access to the Q2 database. Not as flexible as a true ORM, but takes the guesswork out of database schemas and ensures safety in the transactions.

Parameters:
  • logger – Reference to calling request’s logger (self.logger in your extension)

  • hq_credentials (Optional[HqCredentials]) – HQ Connectivity Information (Defaults to settings file)

  • ret_table_obj (Optional[bool]) – Flag to return list of LXML elements if False or TableRow objects from DB calls if True (Defaults to settings file)

GET_BY_NAME_KEY = 'ShortName'
NAME = 'UiText'
REPRESENTATION_ROW_CLASS

alias of UiTextRow

add_arguments(parser)[source]

Hook for subclassed DbObjects to add custom arguments.

async get(prefix, no_trunc=False, serialize_for_cli=False, ui_selection=None)[source]
Return type:

List[UiTextRow]

async get_by_name(name, **kwargs)[source]
Return type:

UiTextRow

async create_bulk(ui_text_objs)[source]
async create(short_name, description, text_value, device_id=1, language='USEnglish', ui_selection=None, serialize_for_cli=False, contains_markup=False)[source]

Adds UiText and related UiTextElement row

Return type:

UiTextRow

async create_per_language(short_name, description, text_value, device_id=1, exclude_language=None, contains_markup=0)[source]
async create_central(short_name, descrition, text_value, language='USEnglish')[source]
async update(short_name, text_value, language='USEnglish', device_name='Browser', ui_selection=None, contains_markup=None)[source]
async delete(short_name, ui_selection_id=None)[source]
async delete_central(short_name)[source]
async delete_bulk(ui_text_objs)[source]

Note: this only works in the dev environment