UserPropertyData
- class q2_sdk.hq.db.user_property_data.UserPropertyDataRow[source]
Bases:
RepresentationRowBase
-
UserPropertyDataID:
IntElement
= 'UserPropertyDataID'
-
UISourceID:
IntElement
= 'UISourceID'
-
GroupID:
IntElement
= 'GroupID'
-
ProductTypeID:
IntElement
= 'ProductTypeID'
-
ProductID:
IntElement
= 'ProductID'
-
CustomerID:
IntElement
= 'CustomerID'
-
UserID:
IntElement
= 'UserID'
-
UserRoleID:
IntElement
= 'UserRoleID'
-
HostAccountID:
IntElement
= 'HostAccountID'
-
PropertyID:
IntElement
= 'PropertyID'
-
PropertyValue:
StringElement
= 'PropertyValue'
-
PropertyName:
StringElement
= 'PropertyName'
-
PropertyDataType:
StringElement
= 'PropertyDataType'
-
Weight:
IntElement
= 'Weight'
-
CategoryShortName:
StringElement
= 'CategoryShortName'
-
CategoryDescription:
StringElement
= 'CategoryDescription'
-
UserPropertyDataID:
- class q2_sdk.hq.db.user_property_data.UserPropertyData(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 ifFalse
or TableRow objects from DB calls ifTrue
(Defaults to settings file)
- REPRESENTATION_ROW_CLASS
alias of
UserPropertyDataRow
- async get(user_property_name, user_id=None, group_id=None, customer_id=None, host_account_id=None, ui_source=None, product_id=None, product_type_id=None, return_count=10, strict=True, no_trunc=False, serialize_for_cli=False, user_role_id=None)[source]
- Return type:
list
[UserPropertyDataRow
]
- async get_by_value(property_value, user_property_name, no_trunc=False, serialize_for_cli=False)[source]
- Return type:
list
[UserPropertyDataRow
]
- async get_by_property_id(property_id)[source]
This method will return user_property_data using by PropertyID.
- Return type:
list
[UserPropertyDataRow
]
- async get_by_group(user_property_name, serialize_for_cli=False)[source]
This method will include the default property value in the return. The default value will be the only value that does not have a group id associated
- Return type:
list
[UserPropertyDataRow
]
- async get_by_group_with_id(user_property_id)[source]
This method will include the default property value in the return. The default value will be the only value that does not have a group id associated
- Return type:
list
[UserPropertyDataRow
]
- async get_by_user_id(user_id, user_property_name=None, user_property_id=None)[source]
- Return type:
list
[UserPropertyDataRow
]
- async get_by_customer_id(customer_id, user_property_name=None, user_property_id=None)[source]
- Return type:
list
[UserPropertyDataRow
]
- async create(property_name, property_value, user_id=None, group_id=None, customer_id=None, host_account_id=None, ui_source=None, product_id=None, product_type_id=None, product_name=None, product_type_name=None, user_role_id=None)[source]
- async update(property_name, property_value, user_id=None, group_id=None, customer_id=None, host_account_id=None, ui_source=None, product_id=None, product_type_id=None, product_name=None, product_type_name=None, user_role_id=None)[source]
- async create_or_update(property_name, property_value, user_id=None, group_id=None, customer_id=None, host_account_id=None, ui_source=None, product_id=None, product_type_id=None, product_name=None, product_type_name=None, user_role_id=None)[source]
There may be times when we want to error if a row already exists (create only). This method exists in case you just want a row to be there after you’re done calling the function, regardless of the initial state of the DB