Published on 04/10/2023
Published by Pratik Takle
How to insert data in DB table using existing services
- Here is an example, of how you can insert your data in an awesome DB table.
- consider table structure is as
- object_id
- coll_id
- coll_type
- meta_key
- meta_value
- insert code will be like
-
1[template.set_array meta_array.new meta_key="{your key}" meta_value="{value for that key}" coll_type="{your coll_type}" /]
create all your entries like this, so at the end, you have a collection of entries and that collection will get inserted in one executive sequence as follows -
1[db.meta.update_object_meta meta_table="{table name}" object_id="{your object_id}" coll_id="{your coll_id}" meta="{template.meta_array}" /]
-