Host Account Data

class q2_sdk.hq.db.host_account_data.HadeUpdateData(HadeName, HadeValue, ClickValue=None, ClickRequestData=None)[source]

Bases: object

HadeUpdateData(HadeName: str, HadeValue: str, ClickValue: str = None, ClickRequestData: str = None)

HadeName: str
HadeValue: str
ClickValue: str = None
ClickRequestData: str = None
to_dict()[source]
class q2_sdk.hq.db.host_account_data.HostAccountDataRow[source]

Bases: RepresentationRowBase

HostAccountID: IntElement = 'HostAccountID'
HADE_ID: IntElement = 'HADE_ID'
DataValue: StringElement = 'DataValue'
ClickValue: StringElement = 'ClickValue'
ClickRequestData: StringElement = 'ClickRequestData'
class q2_sdk.hq.db.host_account_data.BspHostAccountDataRow[source]

Bases: RepresentationRowBase

HADEName: StringElement = 'HADEName'
DataValue: StringElement = 'DataValue'
ClickValue: StringElement = 'ClickValue'
ClickRequestData: StringElement = 'ClickRequestData'
class q2_sdk.hq.db.host_account_data.HostAccountData(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)

REPRESENTATION_ROW_CLASS

alias of HostAccountDataRow

add_arguments(parser)[source]

Hook for subclassed DbObjects to add custom arguments.

async create(host_account_id, hade_id, value, serialize_for_cli=False)[source]

Note: this only works in the dev environment

Return type:

List[HostAccountDataRow]

async get(host_account_id, overlay_rt_table=True, serialize_for_cli=False)[source]

Get rows from the Q2_HostAccountData table for given host_account_id. By default this overlays data from the Q2_HostAccountDataRT table, which is used for certain batch processing scenarios. Shouldn’t be harmful to leave on all the time.

Parameters:
  • host_account_id – Matches the Q2_HostAccountData.HostAccountID column

  • overlay_rt_table – If True, will also query and overlay the Q2_HostAccountDataRT table

  • serialize_for_cli – Used when running from the command line

Return type:

List[BspHostAccountDataRow]

async update(host_account_id, hade_values)[source]
async delete(hade_id, host_account_id)[source]