first commit
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import db
|
||||
|
||||
|
||||
def add_action(
|
||||
slug, element_id, trigger_event, action_type, target_screen_id=None,
|
||||
target_element_id=None, element_property=None, element_value=None,
|
||||
target_definition_id=None, target_row_id=None, target_field=None,
|
||||
data_operation=None, data_value=None,
|
||||
):
|
||||
conn = db.connect(slug)
|
||||
conn.execute(
|
||||
"""INSERT INTO _actions
|
||||
(element_id, trigger_event, action_type, target_screen_id,
|
||||
target_element_id, element_property, element_value,
|
||||
target_definition_id, target_row_id, target_field, data_operation, data_value)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)""",
|
||||
(
|
||||
element_id, trigger_event, action_type, target_screen_id or None,
|
||||
target_element_id or None, element_property or None, element_value or None,
|
||||
target_definition_id or None, target_row_id or None, target_field or None,
|
||||
data_operation or None, data_value or None,
|
||||
),
|
||||
)
|
||||
conn.commit()
|
||||
conn.close()
|
||||
Reference in New Issue
Block a user