diff --git a/data/5.0/ir.json b/data/5.0/ir.json index f1fa594..e0080d8 100644 --- a/data/5.0/ir.json +++ b/data/5.0/ir.json @@ -56,7 +56,7 @@ "*action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain')" ], "kwargs": {}, - "code": "cursor.execute(*action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain'))", + "code": "(transaction.connection.cursor()).execute(*action_report.update(\n [action_report.extension],\n ['txt'],\n where=action_report.extension == 'plain'))", "phase": "after_super" }, { @@ -73,7 +73,7 @@ "kwargs": { "where": "action_report.extension == 'plain'" }, - "code": "action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain')", + "code": "action_report.update(\n [action_report.extension],\n ['txt'],\n where=action_report.extension == 'plain')", "phase": "after_super" } ] @@ -138,7 +138,7 @@ "*act_window.update([act_window.limit], [Null], where=act_window.limit == 0)" ], "kwargs": {}, - "code": "cursor.execute(*act_window.update([act_window.limit], [Null], where=act_window.limit == 0))", + "code": "(Transaction().connection.cursor()).execute(*act_window.update(\n [act_window.limit], [Null],\n where=act_window.limit == 0))", "phase": "after_super" }, { @@ -155,7 +155,7 @@ "kwargs": { "where": "act_window.limit == 0" }, - "code": "act_window.update([act_window.limit], [Null], where=act_window.limit == 0)", + "code": "act_window.update(\n [act_window.limit], [Null],\n where=act_window.limit == 0)", "phase": "after_super" } ] @@ -177,7 +177,7 @@ "*attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null))" ], "kwargs": {}, - "code": "cursor.execute(*attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null)))", + "code": "(Transaction().connection.cursor()).execute(*attachment.update(\n [attachment.file_id],\n [attachment.digest],\n where=(attachment.collision == 0)\n | (attachment.collision == Null)))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -195,7 +195,7 @@ "kwargs": { "where": "(attachment.collision == 0) | (attachment.collision == Null)" }, - "code": "attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null))", + "code": "attachment.update(\n [attachment.file_id],\n [attachment.digest],\n where=(attachment.collision == 0)\n | (attachment.collision == Null))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -210,7 +210,7 @@ "*attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null))" ], "kwargs": {}, - "code": "cursor.execute(*attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null)))", + "code": "(Transaction().connection.cursor()).execute(*attachment.update(\n [attachment.file_id],\n [Concat(Concat(attachment.digest, '-'),\n attachment.collision)],\n where=(attachment.collision != 0)\n & (attachment.collision != Null)))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -228,7 +228,7 @@ "kwargs": { "where": "(attachment.collision != 0) & (attachment.collision != Null)" }, - "code": "attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null))", + "code": "attachment.update(\n [attachment.file_id],\n [Concat(Concat(attachment.digest, '-'),\n attachment.collision)],\n where=(attachment.collision != 0)\n & (attachment.collision != Null))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -295,7 +295,7 @@ "*model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button'))" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button')))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n [model_data.module], ['ir'],\n where=((model_data.module == 'res')\n & (model_data.fs_id == 'model_data_sync_button'))))", "phase": "after_super" }, { @@ -312,7 +312,7 @@ "kwargs": { "where": "(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button')" }, - "code": "model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button'))", + "code": "model_data.update(\n [model_data.module], ['ir'],\n where=((model_data.module == 'res')\n & (model_data.fs_id == 'model_data_sync_button')))", "phase": "after_super" } ] @@ -334,7 +334,7 @@ "*sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed')" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed'))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.state], ['activated'],\n where=sql_table.state == 'installed'))", "phase": "after_super" }, { @@ -351,7 +351,7 @@ "kwargs": { "where": "sql_table.state == 'installed'" }, - "code": "sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed')", + "code": "sql_table.update(\n [sql_table.state], ['activated'],\n where=sql_table.state == 'installed')", "phase": "after_super" }, { @@ -365,7 +365,7 @@ "*sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled')" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled'))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.state], ['not activated'],\n where=sql_table.state == 'uninstalled'))", "phase": "after_super" }, { @@ -382,7 +382,7 @@ "kwargs": { "where": "sql_table.state == 'uninstalled'" }, - "code": "sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled')", + "code": "sql_table.update(\n [sql_table.state], ['not activated'],\n where=sql_table.state == 'uninstalled')", "phase": "after_super" }, { @@ -396,7 +396,7 @@ "*model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids))" ], "kwargs": {}, - "code": "cursor.execute(*model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids)))", + "code": "(Transaction().connection.cursor()).execute(*model_data_sql_table.update(\n [model_data_sql_table.module], ['ir'],\n where=((model_data_sql_table.module == 'res')\n & (model_data_sql_table.fs_id.in_(button_fs_ids)))))", "phase": "after_super" }, { @@ -413,7 +413,7 @@ "kwargs": { "where": "(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids)" }, - "code": "model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids))", + "code": "model_data_sql_table.update(\n [model_data_sql_table.module], ['ir'],\n where=((model_data_sql_table.module == 'res')\n & (model_data_sql_table.fs_id.in_(button_fs_ids))))", "phase": "after_super" } ] @@ -435,7 +435,7 @@ "*model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item')" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item'))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n columns=[model_data.model],\n values=[cls.__name__],\n where=(model_data.model ==\n 'ir.module.module.config_wizard.item')))", "phase": "before_super" }, { @@ -451,7 +451,7 @@ "values": "[cls.__name__]", "where": "model_data.model == 'ir.module.module.config_wizard.item'" }, - "code": "model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item')", + "code": "model_data.update(\n columns=[model_data.model],\n values=[cls.__name__],\n where=(model_data.model ==\n 'ir.module.module.config_wizard.item'))", "phase": "before_super" } ] @@ -475,7 +475,7 @@ "kwargs": { "action": "'add'" }, - "code": "table_h.index_action([queue.scheduled_at.nulls_first, queue.expected_at.nulls_first, queue.dequeued_at, queue.name], action='add')", + "code": "table_h.index_action([\n queue.scheduled_at.nulls_first,\n queue.expected_at.nulls_first,\n queue.dequeued_at,\n queue.name,\n ], action='add')", "phase": "after_super" } ] @@ -520,7 +520,7 @@ "*ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt')" ], "kwargs": {}, - "code": "cursor.execute(*ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt'))", + "code": "(transaction.connection.cursor()).execute(*ir_translation.update(\n [ir_translation.type],\n ['report'],\n where=ir_translation.type == 'odt'))", "phase": "after_super" }, { @@ -537,7 +537,7 @@ "kwargs": { "where": "ir_translation.type == 'odt'" }, - "code": "ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt')", + "code": "ir_translation.update(\n [ir_translation.type],\n ['report'],\n where=ir_translation.type == 'odt')", "phase": "after_super" }, { @@ -574,7 +574,7 @@ "*sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null)" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.select(\n sql_table.id, sql_table.minimum_delay,\n where=sql_table.minimum_delay != Null))", "phase": "after_super", "condition": "table.column_exist('minimum_delay')" }, @@ -592,7 +592,7 @@ "kwargs": { "where": "sql_table.minimum_delay != Null" }, - "code": "sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null)", + "code": "sql_table.select(\n sql_table.id, sql_table.minimum_delay,\n where=sql_table.minimum_delay != Null)", "phase": "after_super", "condition": "table.column_exist('minimum_delay')" }, diff --git a/data/5.0/party.json b/data/5.0/party.json index 1803c19..dff3b69 100644 --- a/data/5.0/party.json +++ b/data/5.0/party.json @@ -19,7 +19,7 @@ "*sql_table.update([sql_table.street], [value])" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.street], [value]))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.street],\n [value]))", "phase": "after_super", "condition": "table.column_exist('streetbis')" }, @@ -35,7 +35,7 @@ "[value]" ], "kwargs": {}, - "code": "sql_table.update([sql_table.street], [value])", + "code": "sql_table.update(\n [sql_table.street],\n [value])", "phase": "after_super", "condition": "table.column_exist('streetbis')" }, @@ -120,7 +120,7 @@ "party.select(party.id, party.lang)" ], "kwargs": {}, - "code": "table.insert([table.party, table.lang], party.select(party.id, party.lang))", + "code": "table.insert(\n [table.party, table.lang],\n party.select(party.id, party.lang))", "phase": "after_super", "condition": "party_h.column_exist('lang')" }, @@ -149,7 +149,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.insert(\n [table.party, table.lang],\n party.select(party.id, party.lang))))", "phase": "after_super", "condition": "party_h.column_exist('lang')" }, @@ -187,7 +187,7 @@ "*party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null))" ], "kwargs": {}, - "code": "cursor.execute(*party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null)))", + "code": "(Transaction().connection.cursor()).execute(*party.select(\n party.id, party.vat_number, party.vat_country,\n where=(party.vat_number != Null)\n | (party.vat_country != Null)))", "phase": "after_super", "condition": "party_h.column_exist('vat_number') and party_h.column_exist('vat_country')" }, @@ -206,7 +206,7 @@ "kwargs": { "where": "(party.vat_number != Null) | (party.vat_country != Null)" }, - "code": "party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null))", + "code": "party.select(\n party.id, party.vat_number, party.vat_country,\n where=(party.vat_number != Null)\n | (party.vat_country != Null))", "phase": "after_super", "condition": "party_h.column_exist('vat_number') and party_h.column_exist('vat_country')" }, diff --git a/data/5.0/product.json b/data/5.0/product.json index 778faab..d24d3cb 100644 --- a/data/5.0/product.json +++ b/data/5.0/product.json @@ -20,7 +20,7 @@ "*sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns]))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns])))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns])))", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" }, @@ -37,7 +37,7 @@ "columns": "[Column(sql_table, c) for c in columns]", "values": "cost_price.select(*[Column(cost_price, c) for c in columns])" }, - "code": "sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns]))", + "code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns]))", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" }, @@ -52,7 +52,7 @@ "*[Column(cost_price, c) for c in columns]" ], "kwargs": {}, - "code": "cost_price.select(*[Column(cost_price, c) for c in columns])", + "code": "cost_price.select(\n *[Column(cost_price, c) for c in columns])", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" } @@ -91,7 +91,7 @@ "*sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null)))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -107,7 +107,7 @@ "columns": "[Column(sql_table, c) for c in columns] + [sql_table.product]", "values": "sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))" }, - "code": "sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null)))", + "code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -122,7 +122,7 @@ "kwargs": { "where": "(sql_table.template != Null) & (sql_table.product == Null)" }, - "code": "sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))", + "code": "sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -137,7 +137,7 @@ "*sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null)))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -152,7 +152,7 @@ "kwargs": { "where": "(sql_table.template != Null) & (sql_table.product == Null)" }, - "code": "sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null))", + "code": "sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null))", "phase": "after_super", "condition": "table.column_exist('template')" }, diff --git a/data/5.0/production.json b/data/5.0/production.json index 8d818ab..4f0e7b7 100644 --- a/data/5.0/production.json +++ b/data/5.0/production.json @@ -35,7 +35,7 @@ "*table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null))" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null)))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.planned_start_date],\n [table.planned_date],\n where=(table.planned_start_date == Null)\n & (table.planned_date != Null)))", "phase": "after_super" }, { @@ -52,7 +52,7 @@ "kwargs": { "where": "(table.planned_start_date == Null) & (table.planned_date != Null)" }, - "code": "table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null))", + "code": "table.update(\n [table.planned_start_date],\n [table.planned_date],\n where=(table.planned_start_date == Null)\n & (table.planned_date != Null))", "phase": "after_super" } ] diff --git a/data/5.0/res.json b/data/5.0/res.json index e3857bb..cc02981 100644 --- a/data/5.0/res.json +++ b/data/5.0/res.json @@ -19,7 +19,7 @@ "*sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new])" ], "kwargs": {}, - "code": "cursor.execute(*sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new]))", + "code": "(Transaction().connection.cursor()).execute(*sqltable.update(\n columns=[sqltable.password_hash],\n values=[password_hash_new]))", "phase": "after_super", "condition": "table.column_exist('password') and table.column_exist('salt')" }, @@ -35,7 +35,7 @@ "columns": "[sqltable.password_hash]", "values": "[password_hash_new]" }, - "code": "sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new])", + "code": "sqltable.update(\n columns=[sqltable.password_hash],\n values=[password_hash_new])", "phase": "after_super", "condition": "table.column_exist('password') and table.column_exist('salt')" }, diff --git a/data/5.2/ir.json b/data/5.2/ir.json index a4c10fb..a3b2f1a 100644 --- a/data/5.2/ir.json +++ b/data/5.2/ir.json @@ -56,7 +56,7 @@ "*action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain')" ], "kwargs": {}, - "code": "cursor.execute(*action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain'))", + "code": "(transaction.connection.cursor()).execute(*action_report.update(\n [action_report.extension],\n ['txt'],\n where=action_report.extension == 'plain'))", "phase": "after_super" }, { @@ -73,7 +73,7 @@ "kwargs": { "where": "action_report.extension == 'plain'" }, - "code": "action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain')", + "code": "action_report.update(\n [action_report.extension],\n ['txt'],\n where=action_report.extension == 'plain')", "phase": "after_super" } ] @@ -138,7 +138,7 @@ "*act_window.update([act_window.limit], [Null], where=act_window.limit == 0)" ], "kwargs": {}, - "code": "cursor.execute(*act_window.update([act_window.limit], [Null], where=act_window.limit == 0))", + "code": "(Transaction().connection.cursor()).execute(*act_window.update(\n [act_window.limit], [Null],\n where=act_window.limit == 0))", "phase": "after_super" }, { @@ -155,7 +155,7 @@ "kwargs": { "where": "act_window.limit == 0" }, - "code": "act_window.update([act_window.limit], [Null], where=act_window.limit == 0)", + "code": "act_window.update(\n [act_window.limit], [Null],\n where=act_window.limit == 0)", "phase": "after_super" } ] @@ -223,7 +223,7 @@ "*attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null))" ], "kwargs": {}, - "code": "cursor.execute(*attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null)))", + "code": "(Transaction().connection.cursor()).execute(*attachment.update(\n [attachment.file_id],\n [attachment.digest],\n where=(attachment.collision == 0)\n | (attachment.collision == Null)))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -241,7 +241,7 @@ "kwargs": { "where": "(attachment.collision == 0) | (attachment.collision == Null)" }, - "code": "attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null))", + "code": "attachment.update(\n [attachment.file_id],\n [attachment.digest],\n where=(attachment.collision == 0)\n | (attachment.collision == Null))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -256,7 +256,7 @@ "*attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null))" ], "kwargs": {}, - "code": "cursor.execute(*attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null)))", + "code": "(Transaction().connection.cursor()).execute(*attachment.update(\n [attachment.file_id],\n [Concat(Concat(attachment.digest, '-'),\n attachment.collision)],\n where=(attachment.collision != 0)\n & (attachment.collision != Null)))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -274,7 +274,7 @@ "kwargs": { "where": "(attachment.collision != 0) & (attachment.collision != Null)" }, - "code": "attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null))", + "code": "attachment.update(\n [attachment.file_id],\n [Concat(Concat(attachment.digest, '-'),\n attachment.collision)],\n where=(attachment.collision != 0)\n & (attachment.collision != Null))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -364,7 +364,7 @@ "*model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button'))" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button')))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n [model_data.module], ['ir'],\n where=((model_data.module == 'res')\n & (model_data.fs_id == 'model_data_sync_button'))))", "phase": "after_super" }, { @@ -381,7 +381,7 @@ "kwargs": { "where": "(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button')" }, - "code": "model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button'))", + "code": "model_data.update(\n [model_data.module], ['ir'],\n where=((model_data.module == 'res')\n & (model_data.fs_id == 'model_data_sync_button')))", "phase": "after_super" }, { @@ -419,7 +419,7 @@ "*sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed')" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed'))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.state], ['activated'],\n where=sql_table.state == 'installed'))", "phase": "after_super" }, { @@ -436,7 +436,7 @@ "kwargs": { "where": "sql_table.state == 'installed'" }, - "code": "sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed')", + "code": "sql_table.update(\n [sql_table.state], ['activated'],\n where=sql_table.state == 'installed')", "phase": "after_super" }, { @@ -450,7 +450,7 @@ "*sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled')" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled'))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.state], ['not activated'],\n where=sql_table.state == 'uninstalled'))", "phase": "after_super" }, { @@ -467,7 +467,7 @@ "kwargs": { "where": "sql_table.state == 'uninstalled'" }, - "code": "sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled')", + "code": "sql_table.update(\n [sql_table.state], ['not activated'],\n where=sql_table.state == 'uninstalled')", "phase": "after_super" }, { @@ -481,7 +481,7 @@ "*model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids))" ], "kwargs": {}, - "code": "cursor.execute(*model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids)))", + "code": "(Transaction().connection.cursor()).execute(*model_data_sql_table.update(\n [model_data_sql_table.module], ['ir'],\n where=((model_data_sql_table.module == 'res')\n & (model_data_sql_table.fs_id.in_(button_fs_ids)))))", "phase": "after_super" }, { @@ -498,7 +498,7 @@ "kwargs": { "where": "(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids)" }, - "code": "model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids))", + "code": "model_data_sql_table.update(\n [model_data_sql_table.module], ['ir'],\n where=((model_data_sql_table.module == 'res')\n & (model_data_sql_table.fs_id.in_(button_fs_ids))))", "phase": "after_super" } ] @@ -520,7 +520,7 @@ "*model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item')" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item'))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n columns=[model_data.model],\n values=[cls.__name__],\n where=(model_data.model ==\n 'ir.module.module.config_wizard.item')))", "phase": "before_super" }, { @@ -536,7 +536,7 @@ "values": "[cls.__name__]", "where": "model_data.model == 'ir.module.module.config_wizard.item'" }, - "code": "model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item')", + "code": "model_data.update(\n columns=[model_data.model],\n values=[cls.__name__],\n where=(model_data.model ==\n 'ir.module.module.config_wizard.item'))", "phase": "before_super" }, { @@ -575,7 +575,7 @@ "kwargs": { "action": "'add'" }, - "code": "table_h.index_action([queue.scheduled_at.nulls_first, queue.expected_at.nulls_first, queue.dequeued_at, queue.name], action='add')", + "code": "table_h.index_action([\n queue.scheduled_at.nulls_first,\n queue.expected_at.nulls_first,\n queue.dequeued_at,\n queue.name,\n ], action='add')", "phase": "after_super" } ] @@ -650,7 +650,7 @@ "*ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt')" ], "kwargs": {}, - "code": "cursor.execute(*ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt'))", + "code": "(transaction.connection.cursor()).execute(*ir_translation.update(\n [ir_translation.type],\n ['report'],\n where=ir_translation.type == 'odt'))", "phase": "after_super" }, { @@ -667,7 +667,7 @@ "kwargs": { "where": "ir_translation.type == 'odt'" }, - "code": "ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt')", + "code": "ir_translation.update(\n [ir_translation.type],\n ['report'],\n where=ir_translation.type == 'odt')", "phase": "after_super" }, { @@ -704,7 +704,7 @@ "*sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null)" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.select(\n sql_table.id, sql_table.minimum_delay,\n where=sql_table.minimum_delay != Null))", "phase": "after_super", "condition": "table.column_exist('minimum_delay')" }, @@ -722,7 +722,7 @@ "kwargs": { "where": "sql_table.minimum_delay != Null" }, - "code": "sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null)", + "code": "sql_table.select(\n sql_table.id, sql_table.minimum_delay,\n where=sql_table.minimum_delay != Null)", "phase": "after_super", "condition": "table.column_exist('minimum_delay')" }, diff --git a/data/5.2/party.json b/data/5.2/party.json index f941093..fd0d9d2 100644 --- a/data/5.2/party.json +++ b/data/5.2/party.json @@ -19,7 +19,7 @@ "*sql_table.update([sql_table.street], [value])" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.street], [value]))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.street],\n [value]))", "phase": "after_super", "condition": "table.column_exist('streetbis')" }, @@ -35,7 +35,7 @@ "[value]" ], "kwargs": {}, - "code": "sql_table.update([sql_table.street], [value])", + "code": "sql_table.update(\n [sql_table.street],\n [value])", "phase": "after_super", "condition": "table.column_exist('streetbis')" }, @@ -120,7 +120,7 @@ "party.select(party.id, party.lang)" ], "kwargs": {}, - "code": "table.insert([table.party, table.lang], party.select(party.id, party.lang))", + "code": "table.insert(\n [table.party, table.lang],\n party.select(party.id, party.lang))", "phase": "after_super", "condition": "party_h.column_exist('lang')" }, @@ -149,7 +149,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.insert(\n [table.party, table.lang],\n party.select(party.id, party.lang))))", "phase": "after_super", "condition": "party_h.column_exist('lang')" }, @@ -187,7 +187,7 @@ "*party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null))" ], "kwargs": {}, - "code": "cursor.execute(*party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null)))", + "code": "(Transaction().connection.cursor()).execute(*party.select(\n party.id, party.vat_number, party.vat_country,\n where=(party.vat_number != Null)\n | (party.vat_country != Null)))", "phase": "after_super", "condition": "party_h.column_exist('vat_number') and party_h.column_exist('vat_country')" }, @@ -206,7 +206,7 @@ "kwargs": { "where": "(party.vat_number != Null) | (party.vat_country != Null)" }, - "code": "party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null))", + "code": "party.select(\n party.id, party.vat_number, party.vat_country,\n where=(party.vat_number != Null)\n | (party.vat_country != Null))", "phase": "after_super", "condition": "party_h.column_exist('vat_number') and party_h.column_exist('vat_country')" }, diff --git a/data/5.2/product.json b/data/5.2/product.json index 68e17aa..653b554 100644 --- a/data/5.2/product.json +++ b/data/5.2/product.json @@ -20,7 +20,7 @@ "*sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns]))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns])))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns])))", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" }, @@ -37,7 +37,7 @@ "columns": "[Column(sql_table, c) for c in columns]", "values": "cost_price.select(*[Column(cost_price, c) for c in columns])" }, - "code": "sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns]))", + "code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns]))", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" }, @@ -52,7 +52,7 @@ "*[Column(cost_price, c) for c in columns]" ], "kwargs": {}, - "code": "cost_price.select(*[Column(cost_price, c) for c in columns])", + "code": "cost_price.select(\n *[Column(cost_price, c) for c in columns])", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" } @@ -91,7 +91,7 @@ "*sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null)))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -107,7 +107,7 @@ "columns": "[Column(sql_table, c) for c in columns] + [sql_table.product]", "values": "sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))" }, - "code": "sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null)))", + "code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -122,7 +122,7 @@ "kwargs": { "where": "(sql_table.template != Null) & (sql_table.product == Null)" }, - "code": "sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))", + "code": "sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -137,7 +137,7 @@ "*sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null)))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -152,7 +152,7 @@ "kwargs": { "where": "(sql_table.template != Null) & (sql_table.product == Null)" }, - "code": "sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null))", + "code": "sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null))", "phase": "after_super", "condition": "table.column_exist('template')" }, diff --git a/data/5.2/production.json b/data/5.2/production.json index b3566be..39154b8 100644 --- a/data/5.2/production.json +++ b/data/5.2/production.json @@ -35,7 +35,7 @@ "*table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null))" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null)))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.planned_start_date],\n [table.planned_date],\n where=(table.planned_start_date == Null)\n & (table.planned_date != Null)))", "phase": "after_super" }, { @@ -52,7 +52,7 @@ "kwargs": { "where": "(table.planned_start_date == Null) & (table.planned_date != Null)" }, - "code": "table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null))", + "code": "table.update(\n [table.planned_start_date],\n [table.planned_date],\n where=(table.planned_start_date == Null)\n & (table.planned_date != Null))", "phase": "after_super" } ] diff --git a/data/5.2/res.json b/data/5.2/res.json index 89323d7..65c4331 100644 --- a/data/5.2/res.json +++ b/data/5.2/res.json @@ -19,7 +19,7 @@ "*sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new])" ], "kwargs": {}, - "code": "cursor.execute(*sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new]))", + "code": "(Transaction().connection.cursor()).execute(*sqltable.update(\n columns=[sqltable.password_hash],\n values=[password_hash_new]))", "phase": "after_super", "condition": "table.column_exist('password') and table.column_exist('salt')" }, @@ -35,7 +35,7 @@ "columns": "[sqltable.password_hash]", "values": "[password_hash_new]" }, - "code": "sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new])", + "code": "sqltable.update(\n columns=[sqltable.password_hash],\n values=[password_hash_new])", "phase": "after_super", "condition": "table.column_exist('password') and table.column_exist('salt')" }, diff --git a/data/5.4/country.json b/data/5.4/country.json index 03a4b49..c722709 100644 --- a/data/5.4/country.json +++ b/data/5.4/country.json @@ -62,7 +62,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -76,7 +76,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" } ] @@ -98,7 +98,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -112,7 +112,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" } ] diff --git a/data/5.4/currency.json b/data/5.4/currency.json index 107ba36..4aeb9c1 100644 --- a/data/5.4/currency.json +++ b/data/5.4/currency.json @@ -19,7 +19,7 @@ "*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -33,7 +33,7 @@ "kwargs": { "where": "(data.module == 'currency') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__))", "phase": "after_super" } ] diff --git a/data/5.4/ir.json b/data/5.4/ir.json index e7496fb..b80fda6 100644 --- a/data/5.4/ir.json +++ b/data/5.4/ir.json @@ -56,7 +56,7 @@ "*action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain')" ], "kwargs": {}, - "code": "cursor.execute(*action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain'))", + "code": "(transaction.connection.cursor()).execute(*action_report.update(\n [action_report.extension],\n ['txt'],\n where=action_report.extension == 'plain'))", "phase": "after_super" }, { @@ -73,7 +73,7 @@ "kwargs": { "where": "action_report.extension == 'plain'" }, - "code": "action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain')", + "code": "action_report.update(\n [action_report.extension],\n ['txt'],\n where=action_report.extension == 'plain')", "phase": "after_super" } ] @@ -138,7 +138,7 @@ "*act_window.update([act_window.limit], [Null], where=act_window.limit == 0)" ], "kwargs": {}, - "code": "cursor.execute(*act_window.update([act_window.limit], [Null], where=act_window.limit == 0))", + "code": "(Transaction().connection.cursor()).execute(*act_window.update(\n [act_window.limit], [Null],\n where=act_window.limit == 0))", "phase": "after_super" }, { @@ -155,7 +155,7 @@ "kwargs": { "where": "act_window.limit == 0" }, - "code": "act_window.update([act_window.limit], [Null], where=act_window.limit == 0)", + "code": "act_window.update(\n [act_window.limit], [Null],\n where=act_window.limit == 0)", "phase": "after_super" } ] @@ -223,7 +223,7 @@ "*attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null))" ], "kwargs": {}, - "code": "cursor.execute(*attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null)))", + "code": "(Transaction().connection.cursor()).execute(*attachment.update(\n [attachment.file_id],\n [attachment.digest],\n where=(attachment.collision == 0)\n | (attachment.collision == Null)))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -241,7 +241,7 @@ "kwargs": { "where": "(attachment.collision == 0) | (attachment.collision == Null)" }, - "code": "attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null))", + "code": "attachment.update(\n [attachment.file_id],\n [attachment.digest],\n where=(attachment.collision == 0)\n | (attachment.collision == Null))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -256,7 +256,7 @@ "*attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null))" ], "kwargs": {}, - "code": "cursor.execute(*attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null)))", + "code": "(Transaction().connection.cursor()).execute(*attachment.update(\n [attachment.file_id],\n [Concat(Concat(attachment.digest, '-'),\n attachment.collision)],\n where=(attachment.collision != 0)\n & (attachment.collision != Null)))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -274,7 +274,7 @@ "kwargs": { "where": "(attachment.collision != 0) & (attachment.collision != Null)" }, - "code": "attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null))", + "code": "attachment.update(\n [attachment.file_id],\n [Concat(Concat(attachment.digest, '-'),\n attachment.collision)],\n where=(attachment.collision != 0)\n & (attachment.collision != Null))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -364,7 +364,7 @@ "*model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button'))" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button')))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n [model_data.module], ['ir'],\n where=((model_data.module == 'res')\n & (model_data.fs_id == 'model_data_sync_button'))))", "phase": "after_super" }, { @@ -381,7 +381,7 @@ "kwargs": { "where": "(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button')" }, - "code": "model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button'))", + "code": "model_data.update(\n [model_data.module], ['ir'],\n where=((model_data.module == 'res')\n & (model_data.fs_id == 'model_data_sync_button')))", "phase": "after_super" }, { @@ -419,7 +419,7 @@ "*sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed')" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed'))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.state], ['activated'],\n where=sql_table.state == 'installed'))", "phase": "after_super" }, { @@ -436,7 +436,7 @@ "kwargs": { "where": "sql_table.state == 'installed'" }, - "code": "sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed')", + "code": "sql_table.update(\n [sql_table.state], ['activated'],\n where=sql_table.state == 'installed')", "phase": "after_super" }, { @@ -450,7 +450,7 @@ "*sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled')" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled'))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.state], ['not activated'],\n where=sql_table.state == 'uninstalled'))", "phase": "after_super" }, { @@ -467,7 +467,7 @@ "kwargs": { "where": "sql_table.state == 'uninstalled'" }, - "code": "sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled')", + "code": "sql_table.update(\n [sql_table.state], ['not activated'],\n where=sql_table.state == 'uninstalled')", "phase": "after_super" }, { @@ -481,7 +481,7 @@ "*model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids))" ], "kwargs": {}, - "code": "cursor.execute(*model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids)))", + "code": "(Transaction().connection.cursor()).execute(*model_data_sql_table.update(\n [model_data_sql_table.module], ['ir'],\n where=((model_data_sql_table.module == 'res')\n & (model_data_sql_table.fs_id.in_(button_fs_ids)))))", "phase": "after_super" }, { @@ -498,7 +498,7 @@ "kwargs": { "where": "(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids)" }, - "code": "model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids))", + "code": "model_data_sql_table.update(\n [model_data_sql_table.module], ['ir'],\n where=((model_data_sql_table.module == 'res')\n & (model_data_sql_table.fs_id.in_(button_fs_ids))))", "phase": "after_super" } ] @@ -520,7 +520,7 @@ "*model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item')" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item'))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n columns=[model_data.model],\n values=[cls.__name__],\n where=(model_data.model ==\n 'ir.module.module.config_wizard.item')))", "phase": "before_super" }, { @@ -536,7 +536,7 @@ "values": "[cls.__name__]", "where": "model_data.model == 'ir.module.module.config_wizard.item'" }, - "code": "model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item')", + "code": "model_data.update(\n columns=[model_data.model],\n values=[cls.__name__],\n where=(model_data.model ==\n 'ir.module.module.config_wizard.item'))", "phase": "before_super" }, { @@ -575,7 +575,7 @@ "kwargs": { "action": "'add'" }, - "code": "table_h.index_action([queue.scheduled_at.nulls_first, queue.expected_at.nulls_first, queue.dequeued_at, queue.name], action='add')", + "code": "table_h.index_action([\n queue.scheduled_at.nulls_first,\n queue.expected_at.nulls_first,\n queue.dequeued_at,\n queue.name,\n ], action='add')", "phase": "after_super" } ] @@ -650,7 +650,7 @@ "*ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt')" ], "kwargs": {}, - "code": "cursor.execute(*ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt'))", + "code": "(transaction.connection.cursor()).execute(*ir_translation.update(\n [ir_translation.type],\n ['report'],\n where=ir_translation.type == 'odt'))", "phase": "after_super" }, { @@ -667,7 +667,7 @@ "kwargs": { "where": "ir_translation.type == 'odt'" }, - "code": "ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt')", + "code": "ir_translation.update(\n [ir_translation.type],\n ['report'],\n where=ir_translation.type == 'odt')", "phase": "after_super" }, { @@ -704,7 +704,7 @@ "*sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null)" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.select(\n sql_table.id, sql_table.minimum_delay,\n where=sql_table.minimum_delay != Null))", "phase": "after_super", "condition": "table.column_exist('minimum_delay')" }, @@ -722,7 +722,7 @@ "kwargs": { "where": "sql_table.minimum_delay != Null" }, - "code": "sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null)", + "code": "sql_table.select(\n sql_table.id, sql_table.minimum_delay,\n where=sql_table.minimum_delay != Null)", "phase": "after_super", "condition": "table.column_exist('minimum_delay')" }, diff --git a/data/5.4/party.json b/data/5.4/party.json index 6086cc9..3261245 100644 --- a/data/5.4/party.json +++ b/data/5.4/party.json @@ -19,7 +19,7 @@ "*sql_table.update([sql_table.street], [value])" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.street], [value]))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.street],\n [value]))", "phase": "after_super", "condition": "table.column_exist('streetbis')" }, @@ -35,7 +35,7 @@ "[value]" ], "kwargs": {}, - "code": "sql_table.update([sql_table.street], [value])", + "code": "sql_table.update(\n [sql_table.street],\n [value])", "phase": "after_super", "condition": "table.column_exist('streetbis')" }, @@ -75,7 +75,7 @@ "country.select(country.code, where=country.id == table.country)" ], "kwargs": {}, - "code": "table.update([table.country_code], country.select(country.code, where=country.id == table.country))", + "code": "table.update(\n [table.country_code],\n country.select(\n country.code,\n where=country.id == table.country))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -92,7 +92,7 @@ "kwargs": { "where": "country.id == table.country" }, - "code": "country.select(country.code, where=country.id == table.country)", + "code": "country.select(\n country.code,\n where=country.id == table.country)", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -105,7 +105,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -137,7 +137,7 @@ "language.select(Substring(language.code, 0, 2), where=language.id == table.language)" ], "kwargs": {}, - "code": "table.update([table.language_code], language.select(Substring(language.code, 0, 2), where=language.id == table.language))", + "code": "table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -154,7 +154,7 @@ "kwargs": { "where": "language.id == table.language" }, - "code": "language.select(Substring(language.code, 0, 2), where=language.id == table.language)", + "code": "language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language)", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -167,7 +167,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -252,7 +252,7 @@ "party.select(party.id, party.lang)" ], "kwargs": {}, - "code": "table.insert([table.party, table.lang], party.select(party.id, party.lang))", + "code": "table.insert(\n [table.party, table.lang],\n party.select(party.id, party.lang))", "phase": "after_super", "condition": "party_h.column_exist('lang')" }, @@ -281,7 +281,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.insert(\n [table.party, table.lang],\n party.select(party.id, party.lang))))", "phase": "after_super", "condition": "party_h.column_exist('lang')" }, @@ -319,7 +319,7 @@ "*party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null))" ], "kwargs": {}, - "code": "cursor.execute(*party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null)))", + "code": "(Transaction().connection.cursor()).execute(*party.select(\n party.id, party.vat_number, party.vat_country,\n where=(party.vat_number != Null)\n | (party.vat_country != Null)))", "phase": "after_super", "condition": "party_h.column_exist('vat_number') and party_h.column_exist('vat_country')" }, @@ -338,7 +338,7 @@ "kwargs": { "where": "(party.vat_number != Null) | (party.vat_country != Null)" }, - "code": "party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null))", + "code": "party.select(\n party.id, party.vat_number, party.vat_country,\n where=(party.vat_number != Null)\n | (party.vat_country != Null))", "phase": "after_super", "condition": "party_h.column_exist('vat_number') and party_h.column_exist('vat_country')" }, diff --git a/data/5.4/product.json b/data/5.4/product.json index 01be5a6..3570c90 100644 --- a/data/5.4/product.json +++ b/data/5.4/product.json @@ -20,7 +20,7 @@ "*sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns]))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns])))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns])))", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" }, @@ -37,7 +37,7 @@ "columns": "[Column(sql_table, c) for c in columns]", "values": "cost_price.select(*[Column(cost_price, c) for c in columns])" }, - "code": "sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns]))", + "code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns]))", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" }, @@ -52,7 +52,7 @@ "*[Column(cost_price, c) for c in columns]" ], "kwargs": {}, - "code": "cost_price.select(*[Column(cost_price, c) for c in columns])", + "code": "cost_price.select(\n *[Column(cost_price, c) for c in columns])", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" } @@ -91,7 +91,7 @@ "*sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null)))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -107,7 +107,7 @@ "columns": "[Column(sql_table, c) for c in columns] + [sql_table.product]", "values": "sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))" }, - "code": "sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null)))", + "code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -122,7 +122,7 @@ "kwargs": { "where": "(sql_table.template != Null) & (sql_table.product == Null)" }, - "code": "sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))", + "code": "sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -137,7 +137,7 @@ "*sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null)))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -152,7 +152,7 @@ "kwargs": { "where": "(sql_table.template != Null) & (sql_table.product == Null)" }, - "code": "sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null))", + "code": "sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null))", "phase": "after_super", "condition": "table.column_exist('template')" }, diff --git a/data/5.4/production.json b/data/5.4/production.json index f34e068..a3fd353 100644 --- a/data/5.4/production.json +++ b/data/5.4/production.json @@ -35,7 +35,7 @@ "*table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null))" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null)))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.planned_start_date],\n [table.planned_date],\n where=(table.planned_start_date == Null)\n & (table.planned_date != Null)))", "phase": "after_super" }, { @@ -52,7 +52,7 @@ "kwargs": { "where": "(table.planned_start_date == Null) & (table.planned_date != Null)" }, - "code": "table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null))", + "code": "table.update(\n [table.planned_start_date],\n [table.planned_date],\n where=(table.planned_start_date == Null)\n & (table.planned_date != Null))", "phase": "after_super" } ] diff --git a/data/5.4/res.json b/data/5.4/res.json index c6cd82f..de33e96 100644 --- a/data/5.4/res.json +++ b/data/5.4/res.json @@ -19,7 +19,7 @@ "*sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new])" ], "kwargs": {}, - "code": "cursor.execute(*sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new]))", + "code": "(Transaction().connection.cursor()).execute(*sqltable.update(\n columns=[sqltable.password_hash],\n values=[password_hash_new]))", "phase": "after_super", "condition": "table.column_exist('password') and table.column_exist('salt')" }, @@ -35,7 +35,7 @@ "columns": "[sqltable.password_hash]", "values": "[password_hash_new]" }, - "code": "sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new])", + "code": "sqltable.update(\n columns=[sqltable.password_hash],\n values=[password_hash_new])", "phase": "after_super", "condition": "table.column_exist('password') and table.column_exist('salt')" }, diff --git a/data/5.4/stock_lot.json b/data/5.4/stock_lot.json index 5fc980e..f6a33d5 100644 --- a/data/5.4/stock_lot.json +++ b/data/5.4/stock_lot.json @@ -17,7 +17,7 @@ "*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)" ], "kwargs": {}, - "code": "cursor_select.execute(*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template))", + "code": "(connection.cursor()).execute(*template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template))", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" }, @@ -32,7 +32,7 @@ "kwargs": { "distinct_on": "template_lot_type.template" }, - "code": "template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)", + "code": "template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template)", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" } diff --git a/data/5.6/country.json b/data/5.6/country.json index a6f0054..2097ba8 100644 --- a/data/5.6/country.json +++ b/data/5.6/country.json @@ -62,7 +62,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -76,7 +76,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" } ] @@ -98,7 +98,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -112,7 +112,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" } ] diff --git a/data/5.6/currency.json b/data/5.6/currency.json index bfe74a5..092117f 100644 --- a/data/5.6/currency.json +++ b/data/5.6/currency.json @@ -19,7 +19,7 @@ "*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -33,7 +33,7 @@ "kwargs": { "where": "(data.module == 'currency') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__))", "phase": "after_super" } ] diff --git a/data/5.6/ir.json b/data/5.6/ir.json index fb6a553..c485df1 100644 --- a/data/5.6/ir.json +++ b/data/5.6/ir.json @@ -56,7 +56,7 @@ "*action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain')" ], "kwargs": {}, - "code": "cursor.execute(*action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain'))", + "code": "(transaction.connection.cursor()).execute(*action_report.update(\n [action_report.extension],\n ['txt'],\n where=action_report.extension == 'plain'))", "phase": "after_super" }, { @@ -73,7 +73,7 @@ "kwargs": { "where": "action_report.extension == 'plain'" }, - "code": "action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain')", + "code": "action_report.update(\n [action_report.extension],\n ['txt'],\n where=action_report.extension == 'plain')", "phase": "after_super" } ] @@ -138,7 +138,7 @@ "*act_window.update([act_window.limit], [Null], where=act_window.limit == 0)" ], "kwargs": {}, - "code": "cursor.execute(*act_window.update([act_window.limit], [Null], where=act_window.limit == 0))", + "code": "(Transaction().connection.cursor()).execute(*act_window.update(\n [act_window.limit], [Null],\n where=act_window.limit == 0))", "phase": "after_super" }, { @@ -155,7 +155,7 @@ "kwargs": { "where": "act_window.limit == 0" }, - "code": "act_window.update([act_window.limit], [Null], where=act_window.limit == 0)", + "code": "act_window.update(\n [act_window.limit], [Null],\n where=act_window.limit == 0)", "phase": "after_super" } ] @@ -223,7 +223,7 @@ "*attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null))" ], "kwargs": {}, - "code": "cursor.execute(*attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null)))", + "code": "(Transaction().connection.cursor()).execute(*attachment.update(\n [attachment.file_id],\n [attachment.digest],\n where=(attachment.collision == 0)\n | (attachment.collision == Null)))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -241,7 +241,7 @@ "kwargs": { "where": "(attachment.collision == 0) | (attachment.collision == Null)" }, - "code": "attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null))", + "code": "attachment.update(\n [attachment.file_id],\n [attachment.digest],\n where=(attachment.collision == 0)\n | (attachment.collision == Null))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -256,7 +256,7 @@ "*attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null))" ], "kwargs": {}, - "code": "cursor.execute(*attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null)))", + "code": "(Transaction().connection.cursor()).execute(*attachment.update(\n [attachment.file_id],\n [Concat(Concat(attachment.digest, '-'),\n attachment.collision)],\n where=(attachment.collision != 0)\n & (attachment.collision != Null)))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -274,7 +274,7 @@ "kwargs": { "where": "(attachment.collision != 0) & (attachment.collision != Null)" }, - "code": "attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null))", + "code": "attachment.update(\n [attachment.file_id],\n [Concat(Concat(attachment.digest, '-'),\n attachment.collision)],\n where=(attachment.collision != 0)\n & (attachment.collision != Null))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -364,7 +364,7 @@ "*model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button'))" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button')))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n [model_data.module], ['ir'],\n where=((model_data.module == 'res')\n & (model_data.fs_id == 'model_data_sync_button'))))", "phase": "after_super" }, { @@ -381,7 +381,7 @@ "kwargs": { "where": "(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button')" }, - "code": "model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button'))", + "code": "model_data.update(\n [model_data.module], ['ir'],\n where=((model_data.module == 'res')\n & (model_data.fs_id == 'model_data_sync_button')))", "phase": "after_super" }, { @@ -436,7 +436,7 @@ "*sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed')" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed'))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.state], ['activated'],\n where=sql_table.state == 'installed'))", "phase": "after_super" }, { @@ -453,7 +453,7 @@ "kwargs": { "where": "sql_table.state == 'installed'" }, - "code": "sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed')", + "code": "sql_table.update(\n [sql_table.state], ['activated'],\n where=sql_table.state == 'installed')", "phase": "after_super" }, { @@ -467,7 +467,7 @@ "*sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled')" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled'))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.state], ['not activated'],\n where=sql_table.state == 'uninstalled'))", "phase": "after_super" }, { @@ -484,7 +484,7 @@ "kwargs": { "where": "sql_table.state == 'uninstalled'" }, - "code": "sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled')", + "code": "sql_table.update(\n [sql_table.state], ['not activated'],\n where=sql_table.state == 'uninstalled')", "phase": "after_super" }, { @@ -498,7 +498,7 @@ "*model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids))" ], "kwargs": {}, - "code": "cursor.execute(*model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids)))", + "code": "(Transaction().connection.cursor()).execute(*model_data_sql_table.update(\n [model_data_sql_table.module], ['ir'],\n where=((model_data_sql_table.module == 'res')\n & (model_data_sql_table.fs_id.in_(button_fs_ids)))))", "phase": "after_super" }, { @@ -515,7 +515,7 @@ "kwargs": { "where": "(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids)" }, - "code": "model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids))", + "code": "model_data_sql_table.update(\n [model_data_sql_table.module], ['ir'],\n where=((model_data_sql_table.module == 'res')\n & (model_data_sql_table.fs_id.in_(button_fs_ids))))", "phase": "after_super" } ] @@ -579,7 +579,7 @@ "*model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item')" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item'))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n columns=[model_data.model],\n values=[cls.__name__],\n where=(model_data.model\n == 'ir.module.module.config_wizard.item')))", "phase": "before_super" }, { @@ -595,7 +595,7 @@ "values": "[cls.__name__]", "where": "model_data.model == 'ir.module.module.config_wizard.item'" }, - "code": "model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item')", + "code": "model_data.update(\n columns=[model_data.model],\n values=[cls.__name__],\n where=(model_data.model\n == 'ir.module.module.config_wizard.item'))", "phase": "before_super" }, { @@ -634,7 +634,7 @@ "kwargs": { "action": "'add'" }, - "code": "table_h.index_action([queue.scheduled_at.nulls_first, queue.expected_at.nulls_first, queue.dequeued_at, queue.name], action='add')", + "code": "table_h.index_action([\n queue.scheduled_at.nulls_first,\n queue.expected_at.nulls_first,\n queue.dequeued_at,\n queue.name,\n ], action='add')", "phase": "after_super" } ] @@ -709,7 +709,7 @@ "*ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt')" ], "kwargs": {}, - "code": "cursor.execute(*ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt'))", + "code": "(transaction.connection.cursor()).execute(*ir_translation.update(\n [ir_translation.type],\n ['report'],\n where=ir_translation.type == 'odt'))", "phase": "after_super" }, { @@ -726,7 +726,7 @@ "kwargs": { "where": "ir_translation.type == 'odt'" }, - "code": "ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt')", + "code": "ir_translation.update(\n [ir_translation.type],\n ['report'],\n where=ir_translation.type == 'odt')", "phase": "after_super" }, { @@ -763,7 +763,7 @@ "*sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null)" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.select(\n sql_table.id, sql_table.minimum_delay,\n where=sql_table.minimum_delay != Null))", "phase": "after_super", "condition": "table.column_exist('minimum_delay')" }, @@ -781,7 +781,7 @@ "kwargs": { "where": "sql_table.minimum_delay != Null" }, - "code": "sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null)", + "code": "sql_table.select(\n sql_table.id, sql_table.minimum_delay,\n where=sql_table.minimum_delay != Null)", "phase": "after_super", "condition": "table.column_exist('minimum_delay')" }, @@ -813,7 +813,7 @@ "kwargs": { "where": "model.id == sql_table.action_model" }, - "code": "model.select(model.model, where=model.id == sql_table.action_model)", + "code": "model.select(\n model.model, where=model.id == sql_table.(model.select(\n model.model, where=model.id == sql_table.action_model)))", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -828,7 +828,7 @@ "*sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))])" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))]))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.action],\n [Concat((model.select(\n model.model, where=model.id == sql_table.action_model)), Concat(\n '|', sql_table.action_function))]))", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -844,7 +844,7 @@ "[Concat(action_model, Concat('|', sql_table.action_function))]" ], "kwargs": {}, - "code": "sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))])", + "code": "sql_table.update(\n [sql_table.action],\n [Concat((model.select(\n model.model, where=model.id == sql_table.action_model)), Concat(\n '|', sql_table.action_function))])", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -859,7 +859,7 @@ "'action_model'" ], "kwargs": {}, - "code": "table_h.drop_column('action_model')", + "code": "table_h.drop_column('(model.select(\n model.model, where=model.id == sql_table.action_model))')", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, diff --git a/data/5.6/party.json b/data/5.6/party.json index 758df64..d282d19 100644 --- a/data/5.6/party.json +++ b/data/5.6/party.json @@ -19,7 +19,7 @@ "*sql_table.update([sql_table.street], [value])" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.street], [value]))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.street],\n [value]))", "phase": "after_super", "condition": "table.column_exist('streetbis')" }, @@ -35,7 +35,7 @@ "[value]" ], "kwargs": {}, - "code": "sql_table.update([sql_table.street], [value])", + "code": "sql_table.update(\n [sql_table.street],\n [value])", "phase": "after_super", "condition": "table.column_exist('streetbis')" }, @@ -75,7 +75,7 @@ "country.select(country.code, where=country.id == table.country)" ], "kwargs": {}, - "code": "table.update([table.country_code], country.select(country.code, where=country.id == table.country))", + "code": "table.update(\n [table.country_code],\n country.select(\n country.code,\n where=country.id == table.country))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -92,7 +92,7 @@ "kwargs": { "where": "country.id == table.country" }, - "code": "country.select(country.code, where=country.id == table.country)", + "code": "country.select(\n country.code,\n where=country.id == table.country)", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -105,7 +105,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -137,7 +137,7 @@ "language.select(Substring(language.code, 0, 2), where=language.id == table.language)" ], "kwargs": {}, - "code": "table.update([table.language_code], language.select(Substring(language.code, 0, 2), where=language.id == table.language))", + "code": "table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -154,7 +154,7 @@ "kwargs": { "where": "language.id == table.language" }, - "code": "language.select(Substring(language.code, 0, 2), where=language.id == table.language)", + "code": "language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language)", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -167,7 +167,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -286,7 +286,7 @@ "party.select(party.id, party.lang)" ], "kwargs": {}, - "code": "table.insert([table.party, table.lang], party.select(party.id, party.lang))", + "code": "table.insert(\n [table.party, table.lang],\n party.select(party.id, party.lang))", "phase": "after_super", "condition": "party_h.column_exist('lang')" }, @@ -315,7 +315,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.insert(\n [table.party, table.lang],\n party.select(party.id, party.lang))))", "phase": "after_super", "condition": "party_h.column_exist('lang')" }, @@ -353,7 +353,7 @@ "*party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null))" ], "kwargs": {}, - "code": "cursor.execute(*party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null)))", + "code": "(Transaction().connection.cursor()).execute(*party.select(\n party.id, party.vat_number, party.vat_country,\n where=(party.vat_number != Null)\n | (party.vat_country != Null)))", "phase": "after_super", "condition": "party_h.column_exist('vat_number') and party_h.column_exist('vat_country')" }, @@ -372,7 +372,7 @@ "kwargs": { "where": "(party.vat_number != Null) | (party.vat_country != Null)" }, - "code": "party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null))", + "code": "party.select(\n party.id, party.vat_number, party.vat_country,\n where=(party.vat_number != Null)\n | (party.vat_country != Null))", "phase": "after_super", "condition": "party_h.column_exist('vat_number') and party_h.column_exist('vat_country')" }, diff --git a/data/5.6/product.json b/data/5.6/product.json index bb7843b..56b019e 100644 --- a/data/5.6/product.json +++ b/data/5.6/product.json @@ -41,7 +41,7 @@ "*table.update([table.suffix_code], [table.code])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.suffix_code], [table.code]))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.suffix_code],\n [table.code]))", "phase": "after_super", "condition": "fill_suffix_code" }, @@ -57,7 +57,7 @@ "[table.code]" ], "kwargs": {}, - "code": "table.update([table.suffix_code], [table.code])", + "code": "table.update(\n [table.suffix_code],\n [table.code])", "phase": "after_super", "condition": "fill_suffix_code" } @@ -114,7 +114,7 @@ "ProductCostPrice._table" ], "kwargs": {}, - "code": "backend.TableHandler.table_exist(ProductCostPrice._table)", + "code": "backend.TableHandler.table_exist(\n ProductCostPrice._table)", "phase": "before_super" }, { @@ -129,7 +129,7 @@ "*sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns]))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns])))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns])))", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" }, @@ -146,7 +146,7 @@ "columns": "[Column(sql_table, c) for c in columns]", "values": "cost_price.select(*[Column(cost_price, c) for c in columns])" }, - "code": "sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns]))", + "code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns]))", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" }, @@ -161,7 +161,7 @@ "*[Column(cost_price, c) for c in columns]" ], "kwargs": {}, - "code": "cost_price.select(*[Column(cost_price, c) for c in columns])", + "code": "cost_price.select(\n *[Column(cost_price, c) for c in columns])", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" } @@ -214,7 +214,7 @@ "*sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null)))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -230,7 +230,7 @@ "columns": "[Column(sql_table, c) for c in columns] + [sql_table.product]", "values": "sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))" }, - "code": "sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null)))", + "code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -245,7 +245,7 @@ "kwargs": { "where": "(sql_table.template != Null) & (sql_table.product == Null)" }, - "code": "sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))", + "code": "sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -260,7 +260,7 @@ "*sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null)))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -275,7 +275,7 @@ "kwargs": { "where": "(sql_table.template != Null) & (sql_table.product == Null)" }, - "code": "sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null))", + "code": "sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null))", "phase": "after_super", "condition": "table.column_exist('template')" }, diff --git a/data/5.6/production.json b/data/5.6/production.json index e044542..d177f7a 100644 --- a/data/5.6/production.json +++ b/data/5.6/production.json @@ -57,7 +57,7 @@ "*table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null))" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null)))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.planned_start_date],\n [table.planned_date],\n where=(table.planned_start_date == Null)\n & (table.planned_date != Null)))", "phase": "after_super" }, { @@ -74,7 +74,7 @@ "kwargs": { "where": "(table.planned_start_date == Null) & (table.planned_date != Null)" }, - "code": "table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null))", + "code": "table.update(\n [table.planned_start_date],\n [table.planned_date],\n where=(table.planned_start_date == Null)\n & (table.planned_date != Null))", "phase": "after_super" } ] diff --git a/data/5.6/res.json b/data/5.6/res.json index a010f6e..0a4c5e7 100644 --- a/data/5.6/res.json +++ b/data/5.6/res.json @@ -19,7 +19,7 @@ "*sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new])" ], "kwargs": {}, - "code": "cursor.execute(*sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new]))", + "code": "(Transaction().connection.cursor()).execute(*sqltable.update(\n columns=[sqltable.password_hash],\n values=[password_hash_new]))", "phase": "after_super", "condition": "table.column_exist('password') and table.column_exist('salt')" }, @@ -35,7 +35,7 @@ "columns": "[sqltable.password_hash]", "values": "[password_hash_new]" }, - "code": "sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new])", + "code": "sqltable.update(\n columns=[sqltable.password_hash],\n values=[password_hash_new])", "phase": "after_super", "condition": "table.column_exist('password') and table.column_exist('salt')" }, diff --git a/data/5.6/stock_lot.json b/data/5.6/stock_lot.json index 9bf214e..3a65b3c 100644 --- a/data/5.6/stock_lot.json +++ b/data/5.6/stock_lot.json @@ -17,7 +17,7 @@ "*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)" ], "kwargs": {}, - "code": "cursor_select.execute(*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template))", + "code": "(connection.cursor()).execute(*template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template))", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" }, @@ -32,7 +32,7 @@ "kwargs": { "distinct_on": "template_lot_type.template" }, - "code": "template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)", + "code": "template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template)", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" } diff --git a/data/5.8/country.json b/data/5.8/country.json index dc48c06..d366138 100644 --- a/data/5.8/country.json +++ b/data/5.8/country.json @@ -62,7 +62,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -76,7 +76,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" } ] @@ -98,7 +98,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -112,7 +112,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" } ] diff --git a/data/5.8/currency.json b/data/5.8/currency.json index 504067d..d5e61ec 100644 --- a/data/5.8/currency.json +++ b/data/5.8/currency.json @@ -19,7 +19,7 @@ "*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -33,7 +33,7 @@ "kwargs": { "where": "(data.module == 'currency') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__))", "phase": "after_super" } ] diff --git a/data/5.8/ir.json b/data/5.8/ir.json index a77d1af..806387b 100644 --- a/data/5.8/ir.json +++ b/data/5.8/ir.json @@ -56,7 +56,7 @@ "*action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain')" ], "kwargs": {}, - "code": "cursor.execute(*action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain'))", + "code": "(transaction.connection.cursor()).execute(*action_report.update(\n [action_report.extension],\n ['txt'],\n where=action_report.extension == 'plain'))", "phase": "after_super" }, { @@ -73,7 +73,7 @@ "kwargs": { "where": "action_report.extension == 'plain'" }, - "code": "action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain')", + "code": "action_report.update(\n [action_report.extension],\n ['txt'],\n where=action_report.extension == 'plain')", "phase": "after_super" } ] @@ -138,7 +138,7 @@ "*act_window.update([act_window.limit], [Null], where=act_window.limit == 0)" ], "kwargs": {}, - "code": "cursor.execute(*act_window.update([act_window.limit], [Null], where=act_window.limit == 0))", + "code": "(Transaction().connection.cursor()).execute(*act_window.update(\n [act_window.limit], [Null],\n where=act_window.limit == 0))", "phase": "after_super" }, { @@ -155,7 +155,7 @@ "kwargs": { "where": "act_window.limit == 0" }, - "code": "act_window.update([act_window.limit], [Null], where=act_window.limit == 0)", + "code": "act_window.update(\n [act_window.limit], [Null],\n where=act_window.limit == 0)", "phase": "after_super" } ] @@ -223,7 +223,7 @@ "*attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null))" ], "kwargs": {}, - "code": "cursor.execute(*attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null)))", + "code": "(Transaction().connection.cursor()).execute(*attachment.update(\n [attachment.file_id],\n [attachment.digest],\n where=(attachment.collision == 0)\n | (attachment.collision == Null)))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -241,7 +241,7 @@ "kwargs": { "where": "(attachment.collision == 0) | (attachment.collision == Null)" }, - "code": "attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null))", + "code": "attachment.update(\n [attachment.file_id],\n [attachment.digest],\n where=(attachment.collision == 0)\n | (attachment.collision == Null))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -256,7 +256,7 @@ "*attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null))" ], "kwargs": {}, - "code": "cursor.execute(*attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null)))", + "code": "(Transaction().connection.cursor()).execute(*attachment.update(\n [attachment.file_id],\n [Concat(Concat(attachment.digest, '-'),\n attachment.collision)],\n where=(attachment.collision != 0)\n & (attachment.collision != Null)))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -274,7 +274,7 @@ "kwargs": { "where": "(attachment.collision != 0) & (attachment.collision != Null)" }, - "code": "attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null))", + "code": "attachment.update(\n [attachment.file_id],\n [Concat(Concat(attachment.digest, '-'),\n attachment.collision)],\n where=(attachment.collision != 0)\n & (attachment.collision != Null))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -364,7 +364,7 @@ "*model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button'))" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button')))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n [model_data.module], ['ir'],\n where=((model_data.module == 'res')\n & (model_data.fs_id == 'model_data_sync_button'))))", "phase": "after_super" }, { @@ -381,7 +381,7 @@ "kwargs": { "where": "(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button')" }, - "code": "model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button'))", + "code": "model_data.update(\n [model_data.module], ['ir'],\n where=((model_data.module == 'res')\n & (model_data.fs_id == 'model_data_sync_button')))", "phase": "after_super" }, { @@ -436,7 +436,7 @@ "*sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed')" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed'))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.state], ['activated'],\n where=sql_table.state == 'installed'))", "phase": "after_super" }, { @@ -453,7 +453,7 @@ "kwargs": { "where": "sql_table.state == 'installed'" }, - "code": "sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed')", + "code": "sql_table.update(\n [sql_table.state], ['activated'],\n where=sql_table.state == 'installed')", "phase": "after_super" }, { @@ -467,7 +467,7 @@ "*sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled')" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled'))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.state], ['not activated'],\n where=sql_table.state == 'uninstalled'))", "phase": "after_super" }, { @@ -484,7 +484,7 @@ "kwargs": { "where": "sql_table.state == 'uninstalled'" }, - "code": "sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled')", + "code": "sql_table.update(\n [sql_table.state], ['not activated'],\n where=sql_table.state == 'uninstalled')", "phase": "after_super" }, { @@ -498,7 +498,7 @@ "*model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids))" ], "kwargs": {}, - "code": "cursor.execute(*model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids)))", + "code": "(Transaction().connection.cursor()).execute(*model_data_sql_table.update(\n [model_data_sql_table.module], ['ir'],\n where=((model_data_sql_table.module == 'res')\n & (model_data_sql_table.fs_id.in_(button_fs_ids)))))", "phase": "after_super" }, { @@ -515,7 +515,7 @@ "kwargs": { "where": "(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids)" }, - "code": "model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids))", + "code": "model_data_sql_table.update(\n [model_data_sql_table.module], ['ir'],\n where=((model_data_sql_table.module == 'res')\n & (model_data_sql_table.fs_id.in_(button_fs_ids))))", "phase": "after_super" } ] @@ -579,7 +579,7 @@ "*model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item')" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item'))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n columns=[model_data.model],\n values=[cls.__name__],\n where=(model_data.model\n == 'ir.module.module.config_wizard.item')))", "phase": "before_super" }, { @@ -595,7 +595,7 @@ "values": "[cls.__name__]", "where": "model_data.model == 'ir.module.module.config_wizard.item'" }, - "code": "model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item')", + "code": "model_data.update(\n columns=[model_data.model],\n values=[cls.__name__],\n where=(model_data.model\n == 'ir.module.module.config_wizard.item'))", "phase": "before_super" }, { @@ -634,7 +634,7 @@ "kwargs": { "action": "'add'" }, - "code": "table_h.index_action([queue.scheduled_at.nulls_first, queue.expected_at.nulls_first, queue.dequeued_at, queue.name], action='add')", + "code": "table_h.index_action([\n queue.scheduled_at.nulls_first,\n queue.expected_at.nulls_first,\n queue.dequeued_at,\n queue.name,\n ], action='add')", "phase": "after_super" } ] @@ -709,7 +709,7 @@ "*ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt')" ], "kwargs": {}, - "code": "cursor.execute(*ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt'))", + "code": "(transaction.connection.cursor()).execute(*ir_translation.update(\n [ir_translation.type],\n ['report'],\n where=ir_translation.type == 'odt'))", "phase": "after_super" }, { @@ -726,7 +726,7 @@ "kwargs": { "where": "ir_translation.type == 'odt'" }, - "code": "ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt')", + "code": "ir_translation.update(\n [ir_translation.type],\n ['report'],\n where=ir_translation.type == 'odt')", "phase": "after_super" }, { @@ -763,7 +763,7 @@ "*sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null)" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.select(\n sql_table.id, sql_table.minimum_delay,\n where=sql_table.minimum_delay != Null))", "phase": "after_super", "condition": "table.column_exist('minimum_delay')" }, @@ -781,7 +781,7 @@ "kwargs": { "where": "sql_table.minimum_delay != Null" }, - "code": "sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null)", + "code": "sql_table.select(\n sql_table.id, sql_table.minimum_delay,\n where=sql_table.minimum_delay != Null)", "phase": "after_super", "condition": "table.column_exist('minimum_delay')" }, @@ -813,7 +813,7 @@ "kwargs": { "where": "model.id == sql_table.action_model" }, - "code": "model.select(model.model, where=model.id == sql_table.action_model)", + "code": "model.select(\n model.model, where=model.id == sql_table.(model.select(\n model.model, where=model.id == sql_table.action_model)))", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -828,7 +828,7 @@ "*sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))])" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))]))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.action],\n [Concat((model.select(\n model.model, where=model.id == sql_table.action_model)), Concat(\n '|', sql_table.action_function))]))", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -844,7 +844,7 @@ "[Concat(action_model, Concat('|', sql_table.action_function))]" ], "kwargs": {}, - "code": "sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))])", + "code": "sql_table.update(\n [sql_table.action],\n [Concat((model.select(\n model.model, where=model.id == sql_table.action_model)), Concat(\n '|', sql_table.action_function))])", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -859,7 +859,7 @@ "'action_model'" ], "kwargs": {}, - "code": "table_h.drop_column('action_model')", + "code": "table_h.drop_column('(model.select(\n model.model, where=model.id == sql_table.action_model))')", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, diff --git a/data/5.8/party.json b/data/5.8/party.json index 338ae4c..7e21eb6 100644 --- a/data/5.8/party.json +++ b/data/5.8/party.json @@ -19,7 +19,7 @@ "*sql_table.update([sql_table.street], [value])" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.street], [value]))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.street],\n [value]))", "phase": "after_super", "condition": "table.column_exist('streetbis')" }, @@ -35,7 +35,7 @@ "[value]" ], "kwargs": {}, - "code": "sql_table.update([sql_table.street], [value])", + "code": "sql_table.update(\n [sql_table.street],\n [value])", "phase": "after_super", "condition": "table.column_exist('streetbis')" }, @@ -75,7 +75,7 @@ "country.select(country.code, where=country.id == table.country)" ], "kwargs": {}, - "code": "table.update([table.country_code], country.select(country.code, where=country.id == table.country))", + "code": "table.update(\n [table.country_code],\n country.select(\n country.code,\n where=country.id == table.country))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -92,7 +92,7 @@ "kwargs": { "where": "country.id == table.country" }, - "code": "country.select(country.code, where=country.id == table.country)", + "code": "country.select(\n country.code,\n where=country.id == table.country)", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -105,7 +105,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -137,7 +137,7 @@ "language.select(Substring(language.code, 0, 2), where=language.id == table.language)" ], "kwargs": {}, - "code": "table.update([table.language_code], language.select(Substring(language.code, 0, 2), where=language.id == table.language))", + "code": "table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -154,7 +154,7 @@ "kwargs": { "where": "language.id == table.language" }, - "code": "language.select(Substring(language.code, 0, 2), where=language.id == table.language)", + "code": "language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language)", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -167,7 +167,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -286,7 +286,7 @@ "party.select(party.id, party.lang)" ], "kwargs": {}, - "code": "table.insert([table.party, table.lang], party.select(party.id, party.lang))", + "code": "table.insert(\n [table.party, table.lang],\n party.select(party.id, party.lang))", "phase": "after_super", "condition": "party_h.column_exist('lang')" }, @@ -315,7 +315,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.insert(\n [table.party, table.lang],\n party.select(party.id, party.lang))))", "phase": "after_super", "condition": "party_h.column_exist('lang')" }, @@ -353,7 +353,7 @@ "*party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null))" ], "kwargs": {}, - "code": "cursor.execute(*party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null)))", + "code": "(Transaction().connection.cursor()).execute(*party.select(\n party.id, party.vat_number, party.vat_country,\n where=(party.vat_number != Null)\n | (party.vat_country != Null)))", "phase": "after_super", "condition": "party_h.column_exist('vat_number') and party_h.column_exist('vat_country')" }, @@ -372,7 +372,7 @@ "kwargs": { "where": "(party.vat_number != Null) | (party.vat_country != Null)" }, - "code": "party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null))", + "code": "party.select(\n party.id, party.vat_number, party.vat_country,\n where=(party.vat_number != Null)\n | (party.vat_country != Null))", "phase": "after_super", "condition": "party_h.column_exist('vat_number') and party_h.column_exist('vat_country')" }, diff --git a/data/5.8/product.json b/data/5.8/product.json index 65a2af0..a9667ec 100644 --- a/data/5.8/product.json +++ b/data/5.8/product.json @@ -41,7 +41,7 @@ "*table.update([table.suffix_code], [table.code])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.suffix_code], [table.code]))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.suffix_code],\n [table.code]))", "phase": "after_super", "condition": "fill_suffix_code" }, @@ -57,7 +57,7 @@ "[table.code]" ], "kwargs": {}, - "code": "table.update([table.suffix_code], [table.code])", + "code": "table.update(\n [table.suffix_code],\n [table.code])", "phase": "after_super", "condition": "fill_suffix_code" } @@ -114,7 +114,7 @@ "ProductCostPrice._table" ], "kwargs": {}, - "code": "backend.TableHandler.table_exist(ProductCostPrice._table)", + "code": "backend.TableHandler.table_exist(\n ProductCostPrice._table)", "phase": "before_super" }, { @@ -129,7 +129,7 @@ "*sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns]))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns])))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns])))", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" }, @@ -146,7 +146,7 @@ "columns": "[Column(sql_table, c) for c in columns]", "values": "cost_price.select(*[Column(cost_price, c) for c in columns])" }, - "code": "sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns]))", + "code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns]))", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" }, @@ -161,7 +161,7 @@ "*[Column(cost_price, c) for c in columns]" ], "kwargs": {}, - "code": "cost_price.select(*[Column(cost_price, c) for c in columns])", + "code": "cost_price.select(\n *[Column(cost_price, c) for c in columns])", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" } @@ -214,7 +214,7 @@ "*sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null)))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -230,7 +230,7 @@ "columns": "[Column(sql_table, c) for c in columns] + [sql_table.product]", "values": "sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))" }, - "code": "sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null)))", + "code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -245,7 +245,7 @@ "kwargs": { "where": "(sql_table.template != Null) & (sql_table.product == Null)" }, - "code": "sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))", + "code": "sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -260,7 +260,7 @@ "*sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null)))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -275,7 +275,7 @@ "kwargs": { "where": "(sql_table.template != Null) & (sql_table.product == Null)" }, - "code": "sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null))", + "code": "sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null))", "phase": "after_super", "condition": "table.column_exist('template')" }, diff --git a/data/5.8/production.json b/data/5.8/production.json index 55161df..f630443 100644 --- a/data/5.8/production.json +++ b/data/5.8/production.json @@ -57,7 +57,7 @@ "*table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null))" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null)))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.planned_start_date],\n [table.planned_date],\n where=(table.planned_start_date == Null)\n & (table.planned_date != Null)))", "phase": "after_super" }, { @@ -74,7 +74,7 @@ "kwargs": { "where": "(table.planned_start_date == Null) & (table.planned_date != Null)" }, - "code": "table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null))", + "code": "table.update(\n [table.planned_start_date],\n [table.planned_date],\n where=(table.planned_start_date == Null)\n & (table.planned_date != Null))", "phase": "after_super" }, { @@ -88,7 +88,7 @@ "*table.update([table.state], ['cancelled'], where=table.state == 'cancel')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.state], ['cancelled'], where=table.state == 'cancel'))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.state], ['cancelled'],\n where=table.state == 'cancel'))", "phase": "after_super" }, { @@ -105,7 +105,7 @@ "kwargs": { "where": "table.state == 'cancel'" }, - "code": "table.update([table.state], ['cancelled'], where=table.state == 'cancel')", + "code": "table.update(\n [table.state], ['cancelled'],\n where=table.state == 'cancel')", "phase": "after_super" } ] diff --git a/data/5.8/res.json b/data/5.8/res.json index 45c75ac..f493d5a 100644 --- a/data/5.8/res.json +++ b/data/5.8/res.json @@ -19,7 +19,7 @@ "*sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new])" ], "kwargs": {}, - "code": "cursor.execute(*sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new]))", + "code": "(Transaction().connection.cursor()).execute(*sqltable.update(\n columns=[sqltable.password_hash],\n values=[password_hash_new]))", "phase": "after_super", "condition": "table.column_exist('password') and table.column_exist('salt')" }, @@ -35,7 +35,7 @@ "columns": "[sqltable.password_hash]", "values": "[password_hash_new]" }, - "code": "sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new])", + "code": "sqltable.update(\n columns=[sqltable.password_hash],\n values=[password_hash_new])", "phase": "after_super", "condition": "table.column_exist('password') and table.column_exist('salt')" }, @@ -96,7 +96,7 @@ "*model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin'))" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin')))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n [model_data.noupdate], [True],\n where=(model_data.model == cls.__name__)\n & (model_data.module == 'res')\n & (model_data.fs_id == 'user_admin')))", "phase": "after_super" }, { @@ -113,7 +113,7 @@ "kwargs": { "where": "(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin')" }, - "code": "model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin'))", + "code": "model_data.update(\n [model_data.noupdate], [True],\n where=(model_data.model == cls.__name__)\n & (model_data.module == 'res')\n & (model_data.fs_id == 'user_admin'))", "phase": "after_super" } ] diff --git a/data/5.8/stock_lot.json b/data/5.8/stock_lot.json index 42a46e4..a699209 100644 --- a/data/5.8/stock_lot.json +++ b/data/5.8/stock_lot.json @@ -17,7 +17,7 @@ "*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)" ], "kwargs": {}, - "code": "cursor_select.execute(*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template))", + "code": "(connection.cursor()).execute(*template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template))", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" }, @@ -32,7 +32,7 @@ "kwargs": { "distinct_on": "template_lot_type.template" }, - "code": "template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)", + "code": "template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template)", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" } diff --git a/data/6.0/company.json b/data/6.0/company.json index 47a758b..68156a7 100644 --- a/data/6.0/company.json +++ b/data/6.0/company.json @@ -64,7 +64,7 @@ "*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null))" ], "kwargs": {}, - "code": "cursor.execute(*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null)))", + "code": "(transaction.connection.cursor()).execute(*user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.main_company,\n where=table.main_company != Null)))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -81,7 +81,7 @@ "table.select(table.id, table.main_company, where=table.main_company != Null)" ], "kwargs": {}, - "code": "user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null))", + "code": "user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.main_company,\n where=table.main_company != Null))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -99,7 +99,7 @@ "kwargs": { "where": "table.main_company != Null" }, - "code": "table.select(table.id, table.main_company, where=table.main_company != Null)", + "code": "table.select(\n table.id, table.main_company,\n where=table.main_company != Null)", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -115,7 +115,7 @@ "*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company)))" ], "kwargs": {}, - "code": "cursor.execute(*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))))", + "code": "(transaction.connection.cursor()).execute(*user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company))))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -132,7 +132,7 @@ "table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))" ], "kwargs": {}, - "code": "user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company)))", + "code": "user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company)))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -150,7 +150,7 @@ "kwargs": { "where": "(table.company != Null) & (table.company != table.main_company)" }, - "code": "table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))", + "code": "table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, diff --git a/data/6.0/country.json b/data/6.0/country.json index 7dc277a..c0ece9e 100644 --- a/data/6.0/country.json +++ b/data/6.0/country.json @@ -62,7 +62,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -76,7 +76,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" } ] @@ -98,7 +98,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -112,7 +112,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" } ] diff --git a/data/6.0/currency.json b/data/6.0/currency.json index a15461a..708e645 100644 --- a/data/6.0/currency.json +++ b/data/6.0/currency.json @@ -19,7 +19,7 @@ "*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -33,7 +33,7 @@ "kwargs": { "where": "(data.module == 'currency') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__))", "phase": "after_super" } ] diff --git a/data/6.0/ir.json b/data/6.0/ir.json index 11a719e..82f0e09 100644 --- a/data/6.0/ir.json +++ b/data/6.0/ir.json @@ -56,7 +56,7 @@ "*action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain')" ], "kwargs": {}, - "code": "cursor.execute(*action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain'))", + "code": "(transaction.connection.cursor()).execute(*action_report.update(\n [action_report.extension],\n ['txt'],\n where=action_report.extension == 'plain'))", "phase": "after_super" }, { @@ -73,7 +73,7 @@ "kwargs": { "where": "action_report.extension == 'plain'" }, - "code": "action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain')", + "code": "action_report.update(\n [action_report.extension],\n ['txt'],\n where=action_report.extension == 'plain')", "phase": "after_super" } ] @@ -138,7 +138,7 @@ "*act_window.update([act_window.limit], [Null], where=act_window.limit == 0)" ], "kwargs": {}, - "code": "cursor.execute(*act_window.update([act_window.limit], [Null], where=act_window.limit == 0))", + "code": "(Transaction().connection.cursor()).execute(*act_window.update(\n [act_window.limit], [Null],\n where=act_window.limit == 0))", "phase": "after_super" }, { @@ -155,7 +155,7 @@ "kwargs": { "where": "act_window.limit == 0" }, - "code": "act_window.update([act_window.limit], [Null], where=act_window.limit == 0)", + "code": "act_window.update(\n [act_window.limit], [Null],\n where=act_window.limit == 0)", "phase": "after_super" } ] @@ -223,7 +223,7 @@ "*attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null))" ], "kwargs": {}, - "code": "cursor.execute(*attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null)))", + "code": "(Transaction().connection.cursor()).execute(*attachment.update(\n [attachment.file_id],\n [attachment.digest],\n where=(attachment.collision == 0)\n | (attachment.collision == Null)))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -241,7 +241,7 @@ "kwargs": { "where": "(attachment.collision == 0) | (attachment.collision == Null)" }, - "code": "attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null))", + "code": "attachment.update(\n [attachment.file_id],\n [attachment.digest],\n where=(attachment.collision == 0)\n | (attachment.collision == Null))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -256,7 +256,7 @@ "*attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null))" ], "kwargs": {}, - "code": "cursor.execute(*attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null)))", + "code": "(Transaction().connection.cursor()).execute(*attachment.update(\n [attachment.file_id],\n [Concat(Concat(attachment.digest, '-'),\n attachment.collision)],\n where=(attachment.collision != 0)\n & (attachment.collision != Null)))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -274,7 +274,7 @@ "kwargs": { "where": "(attachment.collision != 0) & (attachment.collision != Null)" }, - "code": "attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null))", + "code": "attachment.update(\n [attachment.file_id],\n [Concat(Concat(attachment.digest, '-'),\n attachment.collision)],\n where=(attachment.collision != 0)\n & (attachment.collision != Null))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -364,7 +364,7 @@ "*model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button'))" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button')))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n [model_data.module], ['ir'],\n where=((model_data.module == 'res')\n & (model_data.fs_id == 'model_data_sync_button'))))", "phase": "after_super" }, { @@ -381,7 +381,7 @@ "kwargs": { "where": "(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button')" }, - "code": "model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button'))", + "code": "model_data.update(\n [model_data.module], ['ir'],\n where=((model_data.module == 'res')\n & (model_data.fs_id == 'model_data_sync_button')))", "phase": "after_super" }, { @@ -436,7 +436,7 @@ "*sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed')" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed'))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.state], ['activated'],\n where=sql_table.state == 'installed'))", "phase": "after_super" }, { @@ -453,7 +453,7 @@ "kwargs": { "where": "sql_table.state == 'installed'" }, - "code": "sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed')", + "code": "sql_table.update(\n [sql_table.state], ['activated'],\n where=sql_table.state == 'installed')", "phase": "after_super" }, { @@ -467,7 +467,7 @@ "*sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled')" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled'))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.state], ['not activated'],\n where=sql_table.state == 'uninstalled'))", "phase": "after_super" }, { @@ -484,7 +484,7 @@ "kwargs": { "where": "sql_table.state == 'uninstalled'" }, - "code": "sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled')", + "code": "sql_table.update(\n [sql_table.state], ['not activated'],\n where=sql_table.state == 'uninstalled')", "phase": "after_super" }, { @@ -498,7 +498,7 @@ "*model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids))" ], "kwargs": {}, - "code": "cursor.execute(*model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids)))", + "code": "(Transaction().connection.cursor()).execute(*model_data_sql_table.update(\n [model_data_sql_table.module], ['ir'],\n where=((model_data_sql_table.module == 'res')\n & (model_data_sql_table.fs_id.in_(button_fs_ids)))))", "phase": "after_super" }, { @@ -515,7 +515,7 @@ "kwargs": { "where": "(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids)" }, - "code": "model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids))", + "code": "model_data_sql_table.update(\n [model_data_sql_table.module], ['ir'],\n where=((model_data_sql_table.module == 'res')\n & (model_data_sql_table.fs_id.in_(button_fs_ids))))", "phase": "after_super" } ] @@ -579,7 +579,7 @@ "*model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item')" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item'))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n columns=[model_data.model],\n values=[cls.__name__],\n where=(model_data.model\n == 'ir.module.module.config_wizard.item')))", "phase": "before_super" }, { @@ -595,7 +595,7 @@ "values": "[cls.__name__]", "where": "model_data.model == 'ir.module.module.config_wizard.item'" }, - "code": "model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item')", + "code": "model_data.update(\n columns=[model_data.model],\n values=[cls.__name__],\n where=(model_data.model\n == 'ir.module.module.config_wizard.item'))", "phase": "before_super" }, { @@ -634,7 +634,7 @@ "kwargs": { "action": "'add'" }, - "code": "table_h.index_action([queue.scheduled_at.nulls_first, queue.expected_at.nulls_first, queue.dequeued_at, queue.name], action='add')", + "code": "table_h.index_action([\n queue.scheduled_at.nulls_first,\n queue.expected_at.nulls_first,\n queue.dequeued_at,\n queue.name,\n ], action='add')", "phase": "after_super" } ] @@ -681,7 +681,7 @@ "*table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code))" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.sequence_type],\n sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code)))", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -698,7 +698,7 @@ "sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)" ], "kwargs": {}, - "code": "table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code))", + "code": "table.update(\n [table.sequence_type],\n sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code))", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -715,7 +715,7 @@ "kwargs": { "where": "sequence_type.code == table.code" }, - "code": "sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)", + "code": "sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code)", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -806,7 +806,7 @@ "*ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt')" ], "kwargs": {}, - "code": "cursor.execute(*ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt'))", + "code": "(transaction.connection.cursor()).execute(*ir_translation.update(\n [ir_translation.type],\n ['report'],\n where=ir_translation.type == 'odt'))", "phase": "after_super" }, { @@ -823,7 +823,7 @@ "kwargs": { "where": "ir_translation.type == 'odt'" }, - "code": "ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt')", + "code": "ir_translation.update(\n [ir_translation.type],\n ['report'],\n where=ir_translation.type == 'odt')", "phase": "after_super" }, { @@ -860,7 +860,7 @@ "*sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null)" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.select(\n sql_table.id, sql_table.minimum_delay,\n where=sql_table.minimum_delay != Null))", "phase": "after_super", "condition": "table.column_exist('minimum_delay')" }, @@ -878,7 +878,7 @@ "kwargs": { "where": "sql_table.minimum_delay != Null" }, - "code": "sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null)", + "code": "sql_table.select(\n sql_table.id, sql_table.minimum_delay,\n where=sql_table.minimum_delay != Null)", "phase": "after_super", "condition": "table.column_exist('minimum_delay')" }, @@ -910,7 +910,7 @@ "kwargs": { "where": "model.id == sql_table.action_model" }, - "code": "model.select(model.model, where=model.id == sql_table.action_model)", + "code": "model.select(\n model.model, where=model.id == sql_table.(model.select(\n model.model, where=model.id == sql_table.action_model)))", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -925,7 +925,7 @@ "*sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))])" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))]))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.action],\n [Concat((model.select(\n model.model, where=model.id == sql_table.action_model)), Concat(\n '|', sql_table.action_function))]))", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -941,7 +941,7 @@ "[Concat(action_model, Concat('|', sql_table.action_function))]" ], "kwargs": {}, - "code": "sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))])", + "code": "sql_table.update(\n [sql_table.action],\n [Concat((model.select(\n model.model, where=model.id == sql_table.action_model)), Concat(\n '|', sql_table.action_function))])", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -956,7 +956,7 @@ "'action_model'" ], "kwargs": {}, - "code": "table_h.drop_column('action_model')", + "code": "table_h.drop_column('(model.select(\n model.model, where=model.id == sql_table.action_model))')", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, diff --git a/data/6.0/party.json b/data/6.0/party.json index 6edcf64..44e2b75 100644 --- a/data/6.0/party.json +++ b/data/6.0/party.json @@ -34,7 +34,7 @@ "*sql_table.update([sql_table.street], [value])" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.street], [value]))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.street],\n [value]))", "phase": "after_super", "condition": "table.column_exist('streetbis')" }, @@ -50,7 +50,7 @@ "[value]" ], "kwargs": {}, - "code": "sql_table.update([sql_table.street], [value])", + "code": "sql_table.update(\n [sql_table.street],\n [value])", "phase": "after_super", "condition": "table.column_exist('streetbis')" }, @@ -90,7 +90,7 @@ "country.select(country.code, where=country.id == table.country)" ], "kwargs": {}, - "code": "table.update([table.country_code], country.select(country.code, where=country.id == table.country))", + "code": "table.update(\n [table.country_code],\n country.select(\n country.code,\n where=country.id == table.country))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -107,7 +107,7 @@ "kwargs": { "where": "country.id == table.country" }, - "code": "country.select(country.code, where=country.id == table.country)", + "code": "country.select(\n country.code,\n where=country.id == table.country)", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -120,7 +120,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -152,7 +152,7 @@ "language.select(Substring(language.code, 0, 2), where=language.id == table.language)" ], "kwargs": {}, - "code": "table.update([table.language_code], language.select(Substring(language.code, 0, 2), where=language.id == table.language))", + "code": "table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -169,7 +169,7 @@ "kwargs": { "where": "language.id == table.language" }, - "code": "language.select(Substring(language.code, 0, 2), where=language.id == table.language)", + "code": "language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language)", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -182,7 +182,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -301,7 +301,7 @@ "party.select(party.id, party.lang)" ], "kwargs": {}, - "code": "table.insert([table.party, table.lang], party.select(party.id, party.lang))", + "code": "table.insert(\n [table.party, table.lang],\n party.select(party.id, party.lang))", "phase": "after_super", "condition": "party_h.column_exist('lang')" }, @@ -330,7 +330,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.insert(\n [table.party, table.lang],\n party.select(party.id, party.lang))))", "phase": "after_super", "condition": "party_h.column_exist('lang')" }, @@ -368,7 +368,7 @@ "*party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null))" ], "kwargs": {}, - "code": "cursor.execute(*party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null)))", + "code": "(Transaction().connection.cursor()).execute(*party.select(\n party.id, party.vat_number, party.vat_country,\n where=(party.vat_number != Null)\n | (party.vat_country != Null)))", "phase": "after_super", "condition": "party_h.column_exist('vat_number') and party_h.column_exist('vat_country')" }, @@ -387,7 +387,7 @@ "kwargs": { "where": "(party.vat_number != Null) | (party.vat_country != Null)" }, - "code": "party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null))", + "code": "party.select(\n party.id, party.vat_number, party.vat_country,\n where=(party.vat_number != Null)\n | (party.vat_country != Null))", "phase": "after_super", "condition": "party_h.column_exist('vat_number') and party_h.column_exist('vat_country')" }, @@ -432,7 +432,7 @@ "*table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit'))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.type], ['cn_ric'],\n where=(table.type == 'cn_rit')))", "phase": "after_super" }, { @@ -449,7 +449,7 @@ "kwargs": { "where": "table.type == 'cn_rit'" }, - "code": "table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit')", + "code": "table.update([table.type], ['cn_ric'],\n where=(table.type == 'cn_rit'))", "phase": "after_super" } ] diff --git a/data/6.0/product.json b/data/6.0/product.json index fde1204..9bdb22b 100644 --- a/data/6.0/product.json +++ b/data/6.0/product.json @@ -41,7 +41,7 @@ "*table.update([table.suffix_code], [table.code])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.suffix_code], [table.code]))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.suffix_code],\n [table.code]))", "phase": "after_super", "condition": "fill_suffix_code" }, @@ -57,7 +57,7 @@ "[table.code]" ], "kwargs": {}, - "code": "table.update([table.suffix_code], [table.code])", + "code": "table.update(\n [table.suffix_code],\n [table.code])", "phase": "after_super", "condition": "fill_suffix_code" } @@ -114,7 +114,7 @@ "ProductCostPrice._table" ], "kwargs": {}, - "code": "backend.TableHandler.table_exist(ProductCostPrice._table)", + "code": "backend.TableHandler.table_exist(\n ProductCostPrice._table)", "phase": "before_super" }, { @@ -129,7 +129,7 @@ "*sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns]))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns])))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns])))", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" }, @@ -146,7 +146,7 @@ "columns": "[Column(sql_table, c) for c in columns]", "values": "cost_price.select(*[Column(cost_price, c) for c in columns])" }, - "code": "sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns]))", + "code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns]))", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" }, @@ -161,7 +161,7 @@ "*[Column(cost_price, c) for c in columns]" ], "kwargs": {}, - "code": "cost_price.select(*[Column(cost_price, c) for c in columns])", + "code": "cost_price.select(\n *[Column(cost_price, c) for c in columns])", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" } @@ -214,7 +214,7 @@ "*sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null)))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -230,7 +230,7 @@ "columns": "[Column(sql_table, c) for c in columns] + [sql_table.product]", "values": "sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))" }, - "code": "sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null)))", + "code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -245,7 +245,7 @@ "kwargs": { "where": "(sql_table.template != Null) & (sql_table.product == Null)" }, - "code": "sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))", + "code": "sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -260,7 +260,7 @@ "*sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null)))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -275,7 +275,7 @@ "kwargs": { "where": "(sql_table.template != Null) & (sql_table.product == Null)" }, - "code": "sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null))", + "code": "sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null))", "phase": "after_super", "condition": "table.column_exist('template')" }, diff --git a/data/6.0/production.json b/data/6.0/production.json index 6b71d47..909eb9f 100644 --- a/data/6.0/production.json +++ b/data/6.0/production.json @@ -57,7 +57,7 @@ "*table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null))" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null)))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.planned_start_date],\n [table.planned_date],\n where=(table.planned_start_date == Null)\n & (table.planned_date != Null)))", "phase": "after_super" }, { @@ -74,7 +74,7 @@ "kwargs": { "where": "(table.planned_start_date == Null) & (table.planned_date != Null)" }, - "code": "table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null))", + "code": "table.update(\n [table.planned_start_date],\n [table.planned_date],\n where=(table.planned_start_date == Null)\n & (table.planned_date != Null))", "phase": "after_super" }, { @@ -88,7 +88,7 @@ "*table.update([table.state], ['cancelled'], where=table.state == 'cancel')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.state], ['cancelled'], where=table.state == 'cancel'))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.state], ['cancelled'],\n where=table.state == 'cancel'))", "phase": "after_super" }, { @@ -105,7 +105,7 @@ "kwargs": { "where": "table.state == 'cancel'" }, - "code": "table.update([table.state], ['cancelled'], where=table.state == 'cancel')", + "code": "table.update(\n [table.state], ['cancelled'],\n where=table.state == 'cancel')", "phase": "after_super" } ] diff --git a/data/6.0/res.json b/data/6.0/res.json index 91cc573..c28dadf 100644 --- a/data/6.0/res.json +++ b/data/6.0/res.json @@ -19,7 +19,7 @@ "*sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new])" ], "kwargs": {}, - "code": "cursor.execute(*sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new]))", + "code": "(Transaction().connection.cursor()).execute(*sqltable.update(\n columns=[sqltable.password_hash],\n values=[password_hash_new]))", "phase": "after_super", "condition": "table.column_exist('password') and table.column_exist('salt')" }, @@ -35,7 +35,7 @@ "columns": "[sqltable.password_hash]", "values": "[password_hash_new]" }, - "code": "sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new])", + "code": "sqltable.update(\n columns=[sqltable.password_hash],\n values=[password_hash_new])", "phase": "after_super", "condition": "table.column_exist('password') and table.column_exist('salt')" }, @@ -96,7 +96,7 @@ "*model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin'))" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin')))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n [model_data.noupdate], [True],\n where=(model_data.model == cls.__name__)\n & (model_data.module == 'res')\n & (model_data.fs_id == 'user_admin')))", "phase": "after_super" }, { @@ -113,7 +113,7 @@ "kwargs": { "where": "(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin')" }, - "code": "model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin'))", + "code": "model_data.update(\n [model_data.noupdate], [True],\n where=(model_data.model == cls.__name__)\n & (model_data.module == 'res')\n & (model_data.fs_id == 'user_admin'))", "phase": "after_super" } ] diff --git a/data/6.0/stock_lot.json b/data/6.0/stock_lot.json index 4141d07..9de5813 100644 --- a/data/6.0/stock_lot.json +++ b/data/6.0/stock_lot.json @@ -17,7 +17,7 @@ "*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)" ], "kwargs": {}, - "code": "cursor_select.execute(*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template))", + "code": "(connection.cursor()).execute(*template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template))", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" }, @@ -32,7 +32,7 @@ "kwargs": { "distinct_on": "template_lot_type.template" }, - "code": "template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)", + "code": "template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template)", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" } diff --git a/data/6.2/company.json b/data/6.2/company.json index 90d190d..2dd416b 100644 --- a/data/6.2/company.json +++ b/data/6.2/company.json @@ -64,7 +64,7 @@ "*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null))" ], "kwargs": {}, - "code": "cursor.execute(*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null)))", + "code": "(transaction.connection.cursor()).execute(*user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.main_company,\n where=table.main_company != Null)))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -81,7 +81,7 @@ "table.select(table.id, table.main_company, where=table.main_company != Null)" ], "kwargs": {}, - "code": "user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null))", + "code": "user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.main_company,\n where=table.main_company != Null))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -99,7 +99,7 @@ "kwargs": { "where": "table.main_company != Null" }, - "code": "table.select(table.id, table.main_company, where=table.main_company != Null)", + "code": "table.select(\n table.id, table.main_company,\n where=table.main_company != Null)", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -115,7 +115,7 @@ "*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company)))" ], "kwargs": {}, - "code": "cursor.execute(*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))))", + "code": "(transaction.connection.cursor()).execute(*user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company))))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -132,7 +132,7 @@ "table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))" ], "kwargs": {}, - "code": "user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company)))", + "code": "user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company)))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -150,7 +150,7 @@ "kwargs": { "where": "(table.company != Null) & (table.company != table.main_company)" }, - "code": "table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))", + "code": "table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, diff --git a/data/6.2/country.json b/data/6.2/country.json index a5de9be..04e738c 100644 --- a/data/6.2/country.json +++ b/data/6.2/country.json @@ -62,7 +62,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -76,7 +76,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" } ] @@ -98,7 +98,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -112,7 +112,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" } ] diff --git a/data/6.2/currency.json b/data/6.2/currency.json index 4960f75..90d1f6d 100644 --- a/data/6.2/currency.json +++ b/data/6.2/currency.json @@ -19,7 +19,7 @@ "*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -33,7 +33,7 @@ "kwargs": { "where": "(data.module == 'currency') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__))", "phase": "after_super" } ] diff --git a/data/6.2/ir.json b/data/6.2/ir.json index 8ded1d3..cb11a9d 100644 --- a/data/6.2/ir.json +++ b/data/6.2/ir.json @@ -56,7 +56,7 @@ "*action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain')" ], "kwargs": {}, - "code": "cursor.execute(*action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain'))", + "code": "(transaction.connection.cursor()).execute(*action_report.update(\n [action_report.extension],\n ['txt'],\n where=action_report.extension == 'plain'))", "phase": "after_super" }, { @@ -73,7 +73,7 @@ "kwargs": { "where": "action_report.extension == 'plain'" }, - "code": "action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain')", + "code": "action_report.update(\n [action_report.extension],\n ['txt'],\n where=action_report.extension == 'plain')", "phase": "after_super" } ] @@ -138,7 +138,7 @@ "*act_window.update([act_window.limit], [Null], where=act_window.limit == 0)" ], "kwargs": {}, - "code": "cursor.execute(*act_window.update([act_window.limit], [Null], where=act_window.limit == 0))", + "code": "(Transaction().connection.cursor()).execute(*act_window.update(\n [act_window.limit], [Null],\n where=act_window.limit == 0))", "phase": "after_super" }, { @@ -155,7 +155,7 @@ "kwargs": { "where": "act_window.limit == 0" }, - "code": "act_window.update([act_window.limit], [Null], where=act_window.limit == 0)", + "code": "act_window.update(\n [act_window.limit], [Null],\n where=act_window.limit == 0)", "phase": "after_super" } ] @@ -223,7 +223,7 @@ "*attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null))" ], "kwargs": {}, - "code": "cursor.execute(*attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null)))", + "code": "(Transaction().connection.cursor()).execute(*attachment.update(\n [attachment.file_id],\n [attachment.digest],\n where=(attachment.collision == 0)\n | (attachment.collision == Null)))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -241,7 +241,7 @@ "kwargs": { "where": "(attachment.collision == 0) | (attachment.collision == Null)" }, - "code": "attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null))", + "code": "attachment.update(\n [attachment.file_id],\n [attachment.digest],\n where=(attachment.collision == 0)\n | (attachment.collision == Null))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -256,7 +256,7 @@ "*attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null))" ], "kwargs": {}, - "code": "cursor.execute(*attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null)))", + "code": "(Transaction().connection.cursor()).execute(*attachment.update(\n [attachment.file_id],\n [Concat(Concat(attachment.digest, '-'),\n attachment.collision)],\n where=(attachment.collision != 0)\n & (attachment.collision != Null)))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -274,7 +274,7 @@ "kwargs": { "where": "(attachment.collision != 0) & (attachment.collision != Null)" }, - "code": "attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null))", + "code": "attachment.update(\n [attachment.file_id],\n [Concat(Concat(attachment.digest, '-'),\n attachment.collision)],\n where=(attachment.collision != 0)\n & (attachment.collision != Null))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -364,7 +364,7 @@ "*model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button'))" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button')))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n [model_data.module], ['ir'],\n where=((model_data.module == 'res')\n & (model_data.fs_id == 'model_data_sync_button'))))", "phase": "after_super" }, { @@ -381,7 +381,7 @@ "kwargs": { "where": "(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button')" }, - "code": "model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button'))", + "code": "model_data.update(\n [model_data.module], ['ir'],\n where=((model_data.module == 'res')\n & (model_data.fs_id == 'model_data_sync_button')))", "phase": "after_super" }, { @@ -436,7 +436,7 @@ "*sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed')" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed'))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.state], ['activated'],\n where=sql_table.state == 'installed'))", "phase": "after_super" }, { @@ -453,7 +453,7 @@ "kwargs": { "where": "sql_table.state == 'installed'" }, - "code": "sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed')", + "code": "sql_table.update(\n [sql_table.state], ['activated'],\n where=sql_table.state == 'installed')", "phase": "after_super" }, { @@ -467,7 +467,7 @@ "*sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled')" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled'))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.state], ['not activated'],\n where=sql_table.state == 'uninstalled'))", "phase": "after_super" }, { @@ -484,7 +484,7 @@ "kwargs": { "where": "sql_table.state == 'uninstalled'" }, - "code": "sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled')", + "code": "sql_table.update(\n [sql_table.state], ['not activated'],\n where=sql_table.state == 'uninstalled')", "phase": "after_super" }, { @@ -498,7 +498,7 @@ "*model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids))" ], "kwargs": {}, - "code": "cursor.execute(*model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids)))", + "code": "(Transaction().connection.cursor()).execute(*model_data_sql_table.update(\n [model_data_sql_table.module], ['ir'],\n where=((model_data_sql_table.module == 'res')\n & (model_data_sql_table.fs_id.in_(button_fs_ids)))))", "phase": "after_super" }, { @@ -515,7 +515,7 @@ "kwargs": { "where": "(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids)" }, - "code": "model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids))", + "code": "model_data_sql_table.update(\n [model_data_sql_table.module], ['ir'],\n where=((model_data_sql_table.module == 'res')\n & (model_data_sql_table.fs_id.in_(button_fs_ids))))", "phase": "after_super" } ] @@ -579,7 +579,7 @@ "*model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item')" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item'))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n columns=[model_data.model],\n values=[cls.__name__],\n where=(model_data.model\n == 'ir.module.module.config_wizard.item')))", "phase": "before_super" }, { @@ -595,7 +595,7 @@ "values": "[cls.__name__]", "where": "model_data.model == 'ir.module.module.config_wizard.item'" }, - "code": "model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item')", + "code": "model_data.update(\n columns=[model_data.model],\n values=[cls.__name__],\n where=(model_data.model\n == 'ir.module.module.config_wizard.item'))", "phase": "before_super" }, { @@ -634,7 +634,7 @@ "kwargs": { "action": "'add'" }, - "code": "table_h.index_action([queue.scheduled_at.nulls_first, queue.expected_at.nulls_first, queue.dequeued_at, queue.name], action='add')", + "code": "table_h.index_action([\n queue.scheduled_at.nulls_first,\n queue.expected_at.nulls_first,\n queue.dequeued_at,\n queue.name,\n ], action='add')", "phase": "after_super" } ] @@ -681,7 +681,7 @@ "*table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code))" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.sequence_type],\n sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code)))", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -698,7 +698,7 @@ "sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)" ], "kwargs": {}, - "code": "table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code))", + "code": "table.update(\n [table.sequence_type],\n sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code))", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -715,7 +715,7 @@ "kwargs": { "where": "sequence_type.code == table.code" }, - "code": "sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)", + "code": "sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code)", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -806,7 +806,7 @@ "*ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt')" ], "kwargs": {}, - "code": "cursor.execute(*ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt'))", + "code": "(transaction.connection.cursor()).execute(*ir_translation.update(\n [ir_translation.type],\n ['report'],\n where=ir_translation.type == 'odt'))", "phase": "after_super" }, { @@ -823,7 +823,7 @@ "kwargs": { "where": "ir_translation.type == 'odt'" }, - "code": "ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt')", + "code": "ir_translation.update(\n [ir_translation.type],\n ['report'],\n where=ir_translation.type == 'odt')", "phase": "after_super" }, { @@ -860,7 +860,7 @@ "*sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null)" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.select(\n sql_table.id, sql_table.minimum_delay,\n where=sql_table.minimum_delay != Null))", "phase": "after_super", "condition": "table.column_exist('minimum_delay')" }, @@ -878,7 +878,7 @@ "kwargs": { "where": "sql_table.minimum_delay != Null" }, - "code": "sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null)", + "code": "sql_table.select(\n sql_table.id, sql_table.minimum_delay,\n where=sql_table.minimum_delay != Null)", "phase": "after_super", "condition": "table.column_exist('minimum_delay')" }, @@ -910,7 +910,7 @@ "kwargs": { "where": "model.id == sql_table.action_model" }, - "code": "model.select(model.model, where=model.id == sql_table.action_model)", + "code": "model.select(\n model.model, where=model.id == sql_table.(model.select(\n model.model, where=model.id == sql_table.action_model)))", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -925,7 +925,7 @@ "*sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))])" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))]))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.action],\n [Concat((model.select(\n model.model, where=model.id == sql_table.action_model)), Concat(\n '|', sql_table.action_function))]))", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -941,7 +941,7 @@ "[Concat(action_model, Concat('|', sql_table.action_function))]" ], "kwargs": {}, - "code": "sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))])", + "code": "sql_table.update(\n [sql_table.action],\n [Concat((model.select(\n model.model, where=model.id == sql_table.action_model)), Concat(\n '|', sql_table.action_function))])", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -956,7 +956,7 @@ "'action_model'" ], "kwargs": {}, - "code": "table_h.drop_column('action_model')", + "code": "table_h.drop_column('(model.select(\n model.model, where=model.id == sql_table.action_model))')", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, diff --git a/data/6.2/party.json b/data/6.2/party.json index f55d80c..f866693 100644 --- a/data/6.2/party.json +++ b/data/6.2/party.json @@ -34,7 +34,7 @@ "*sql_table.update([sql_table.street], [value])" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.street], [value]))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.street],\n [value]))", "phase": "after_super", "condition": "table.column_exist('streetbis')" }, @@ -50,7 +50,7 @@ "[value]" ], "kwargs": {}, - "code": "sql_table.update([sql_table.street], [value])", + "code": "sql_table.update(\n [sql_table.street],\n [value])", "phase": "after_super", "condition": "table.column_exist('streetbis')" }, @@ -90,7 +90,7 @@ "country.select(country.code, where=country.id == table.country)" ], "kwargs": {}, - "code": "table.update([table.country_code], country.select(country.code, where=country.id == table.country))", + "code": "table.update(\n [table.country_code],\n country.select(\n country.code,\n where=country.id == table.country))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -107,7 +107,7 @@ "kwargs": { "where": "country.id == table.country" }, - "code": "country.select(country.code, where=country.id == table.country)", + "code": "country.select(\n country.code,\n where=country.id == table.country)", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -120,7 +120,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -152,7 +152,7 @@ "language.select(Substring(language.code, 0, 2), where=language.id == table.language)" ], "kwargs": {}, - "code": "table.update([table.language_code], language.select(Substring(language.code, 0, 2), where=language.id == table.language))", + "code": "table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -169,7 +169,7 @@ "kwargs": { "where": "language.id == table.language" }, - "code": "language.select(Substring(language.code, 0, 2), where=language.id == table.language)", + "code": "language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language)", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -182,7 +182,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -301,7 +301,7 @@ "party.select(party.id, party.lang)" ], "kwargs": {}, - "code": "table.insert([table.party, table.lang], party.select(party.id, party.lang))", + "code": "table.insert(\n [table.party, table.lang],\n party.select(party.id, party.lang))", "phase": "after_super", "condition": "party_h.column_exist('lang')" }, @@ -330,7 +330,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.insert(\n [table.party, table.lang],\n party.select(party.id, party.lang))))", "phase": "after_super", "condition": "party_h.column_exist('lang')" }, @@ -368,7 +368,7 @@ "*party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null))" ], "kwargs": {}, - "code": "cursor.execute(*party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null)))", + "code": "(Transaction().connection.cursor()).execute(*party.select(\n party.id, party.vat_number, party.vat_country,\n where=(party.vat_number != Null)\n | (party.vat_country != Null)))", "phase": "after_super", "condition": "party_h.column_exist('vat_number') and party_h.column_exist('vat_country')" }, @@ -387,7 +387,7 @@ "kwargs": { "where": "(party.vat_number != Null) | (party.vat_country != Null)" }, - "code": "party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null))", + "code": "party.select(\n party.id, party.vat_number, party.vat_country,\n where=(party.vat_number != Null)\n | (party.vat_country != Null))", "phase": "after_super", "condition": "party_h.column_exist('vat_number') and party_h.column_exist('vat_country')" }, @@ -432,7 +432,7 @@ "*table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit'))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.type], ['cn_ric'],\n where=(table.type == 'cn_rit')))", "phase": "after_super" }, { @@ -449,7 +449,7 @@ "kwargs": { "where": "table.type == 'cn_rit'" }, - "code": "table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit')", + "code": "table.update([table.type], ['cn_ric'],\n where=(table.type == 'cn_rit'))", "phase": "after_super" } ] diff --git a/data/6.2/product.json b/data/6.2/product.json index ec21572..b54e9a5 100644 --- a/data/6.2/product.json +++ b/data/6.2/product.json @@ -41,7 +41,7 @@ "*table.update([table.suffix_code], [table.code])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.suffix_code], [table.code]))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.suffix_code],\n [table.code]))", "phase": "after_super", "condition": "fill_suffix_code" }, @@ -57,7 +57,7 @@ "[table.code]" ], "kwargs": {}, - "code": "table.update([table.suffix_code], [table.code])", + "code": "table.update(\n [table.suffix_code],\n [table.code])", "phase": "after_super", "condition": "fill_suffix_code" } @@ -114,7 +114,7 @@ "ProductCostPrice._table" ], "kwargs": {}, - "code": "backend.TableHandler.table_exist(ProductCostPrice._table)", + "code": "backend.TableHandler.table_exist(\n ProductCostPrice._table)", "phase": "before_super" }, { @@ -129,7 +129,7 @@ "*sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns]))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns])))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns])))", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" }, @@ -146,7 +146,7 @@ "columns": "[Column(sql_table, c) for c in columns]", "values": "cost_price.select(*[Column(cost_price, c) for c in columns])" }, - "code": "sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns]))", + "code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns]))", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" }, @@ -161,7 +161,7 @@ "*[Column(cost_price, c) for c in columns]" ], "kwargs": {}, - "code": "cost_price.select(*[Column(cost_price, c) for c in columns])", + "code": "cost_price.select(\n *[Column(cost_price, c) for c in columns])", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" } @@ -214,7 +214,7 @@ "*sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null)))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -230,7 +230,7 @@ "columns": "[Column(sql_table, c) for c in columns] + [sql_table.product]", "values": "sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))" }, - "code": "sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null)))", + "code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -245,7 +245,7 @@ "kwargs": { "where": "(sql_table.template != Null) & (sql_table.product == Null)" }, - "code": "sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))", + "code": "sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -260,7 +260,7 @@ "*sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null)))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -275,7 +275,7 @@ "kwargs": { "where": "(sql_table.template != Null) & (sql_table.product == Null)" }, - "code": "sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null))", + "code": "sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null))", "phase": "after_super", "condition": "table.column_exist('template')" }, diff --git a/data/6.2/production.json b/data/6.2/production.json index a220235..dbb55d1 100644 --- a/data/6.2/production.json +++ b/data/6.2/production.json @@ -79,7 +79,7 @@ "*table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null))" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null)))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.planned_start_date],\n [table.planned_date],\n where=(table.planned_start_date == Null)\n & (table.planned_date != Null)))", "phase": "after_super" }, { @@ -96,7 +96,7 @@ "kwargs": { "where": "(table.planned_start_date == Null) & (table.planned_date != Null)" }, - "code": "table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null))", + "code": "table.update(\n [table.planned_start_date],\n [table.planned_date],\n where=(table.planned_start_date == Null)\n & (table.planned_date != Null))", "phase": "after_super" }, { @@ -110,7 +110,7 @@ "*table.update([table.state], ['cancelled'], where=table.state == 'cancel')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.state], ['cancelled'], where=table.state == 'cancel'))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.state], ['cancelled'],\n where=table.state == 'cancel'))", "phase": "after_super" }, { @@ -127,7 +127,7 @@ "kwargs": { "where": "table.state == 'cancel'" }, - "code": "table.update([table.state], ['cancelled'], where=table.state == 'cancel')", + "code": "table.update(\n [table.state], ['cancelled'],\n where=table.state == 'cancel')", "phase": "after_super" } ] diff --git a/data/6.2/res.json b/data/6.2/res.json index d828617..88766e4 100644 --- a/data/6.2/res.json +++ b/data/6.2/res.json @@ -19,7 +19,7 @@ "*sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new])" ], "kwargs": {}, - "code": "cursor.execute(*sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new]))", + "code": "(Transaction().connection.cursor()).execute(*sqltable.update(\n columns=[sqltable.password_hash],\n values=[password_hash_new]))", "phase": "after_super", "condition": "table.column_exist('password') and table.column_exist('salt')" }, @@ -35,7 +35,7 @@ "columns": "[sqltable.password_hash]", "values": "[password_hash_new]" }, - "code": "sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new])", + "code": "sqltable.update(\n columns=[sqltable.password_hash],\n values=[password_hash_new])", "phase": "after_super", "condition": "table.column_exist('password') and table.column_exist('salt')" }, @@ -96,7 +96,7 @@ "*model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin'))" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin')))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n [model_data.noupdate], [True],\n where=(model_data.model == cls.__name__)\n & (model_data.module == 'res')\n & (model_data.fs_id == 'user_admin')))", "phase": "after_super" }, { @@ -113,7 +113,7 @@ "kwargs": { "where": "(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin')" }, - "code": "model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin'))", + "code": "model_data.update(\n [model_data.noupdate], [True],\n where=(model_data.model == cls.__name__)\n & (model_data.module == 'res')\n & (model_data.fs_id == 'user_admin'))", "phase": "after_super" } ] diff --git a/data/6.2/stock_lot.json b/data/6.2/stock_lot.json index 7236edc..0100422 100644 --- a/data/6.2/stock_lot.json +++ b/data/6.2/stock_lot.json @@ -17,7 +17,7 @@ "*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)" ], "kwargs": {}, - "code": "cursor_select.execute(*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template))", + "code": "(connection.cursor()).execute(*template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template))", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" }, @@ -32,7 +32,7 @@ "kwargs": { "distinct_on": "template_lot_type.template" }, - "code": "template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)", + "code": "template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template)", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" } diff --git a/data/6.4/company.json b/data/6.4/company.json index c271c84..825aa32 100644 --- a/data/6.4/company.json +++ b/data/6.4/company.json @@ -64,7 +64,7 @@ "*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null))" ], "kwargs": {}, - "code": "cursor.execute(*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null)))", + "code": "(transaction.connection.cursor()).execute(*user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.main_company,\n where=table.main_company != Null)))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -81,7 +81,7 @@ "table.select(table.id, table.main_company, where=table.main_company != Null)" ], "kwargs": {}, - "code": "user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null))", + "code": "user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.main_company,\n where=table.main_company != Null))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -99,7 +99,7 @@ "kwargs": { "where": "table.main_company != Null" }, - "code": "table.select(table.id, table.main_company, where=table.main_company != Null)", + "code": "table.select(\n table.id, table.main_company,\n where=table.main_company != Null)", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -115,7 +115,7 @@ "*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company)))" ], "kwargs": {}, - "code": "cursor.execute(*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))))", + "code": "(transaction.connection.cursor()).execute(*user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company))))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -132,7 +132,7 @@ "table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))" ], "kwargs": {}, - "code": "user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company)))", + "code": "user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company)))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -150,7 +150,7 @@ "kwargs": { "where": "(table.company != Null) & (table.company != table.main_company)" }, - "code": "table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))", + "code": "table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, diff --git a/data/6.4/country.json b/data/6.4/country.json index 3d036ff..5a05fba 100644 --- a/data/6.4/country.json +++ b/data/6.4/country.json @@ -62,7 +62,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -76,7 +76,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" } ] @@ -98,7 +98,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -112,7 +112,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" }, { diff --git a/data/6.4/currency.json b/data/6.4/currency.json index 6480448..6fd6b6f 100644 --- a/data/6.4/currency.json +++ b/data/6.4/currency.json @@ -19,7 +19,7 @@ "*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -33,7 +33,7 @@ "kwargs": { "where": "(data.module == 'currency') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__))", "phase": "after_super" } ] diff --git a/data/6.4/ir.json b/data/6.4/ir.json index 5971a3f..246ff1d 100644 --- a/data/6.4/ir.json +++ b/data/6.4/ir.json @@ -56,7 +56,7 @@ "*action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain')" ], "kwargs": {}, - "code": "cursor.execute(*action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain'))", + "code": "(transaction.connection.cursor()).execute(*action_report.update(\n [action_report.extension],\n ['txt'],\n where=action_report.extension == 'plain'))", "phase": "after_super" }, { @@ -73,7 +73,7 @@ "kwargs": { "where": "action_report.extension == 'plain'" }, - "code": "action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain')", + "code": "action_report.update(\n [action_report.extension],\n ['txt'],\n where=action_report.extension == 'plain')", "phase": "after_super" } ] @@ -138,7 +138,7 @@ "*act_window.update([act_window.limit], [Null], where=act_window.limit == 0)" ], "kwargs": {}, - "code": "cursor.execute(*act_window.update([act_window.limit], [Null], where=act_window.limit == 0))", + "code": "(Transaction().connection.cursor()).execute(*act_window.update(\n [act_window.limit], [Null],\n where=act_window.limit == 0))", "phase": "after_super" }, { @@ -155,7 +155,7 @@ "kwargs": { "where": "act_window.limit == 0" }, - "code": "act_window.update([act_window.limit], [Null], where=act_window.limit == 0)", + "code": "act_window.update(\n [act_window.limit], [Null],\n where=act_window.limit == 0)", "phase": "after_super" } ] @@ -223,7 +223,7 @@ "*attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null))" ], "kwargs": {}, - "code": "cursor.execute(*attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null)))", + "code": "(Transaction().connection.cursor()).execute(*attachment.update(\n [attachment.file_id],\n [attachment.digest],\n where=(attachment.collision == 0)\n | (attachment.collision == Null)))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -241,7 +241,7 @@ "kwargs": { "where": "(attachment.collision == 0) | (attachment.collision == Null)" }, - "code": "attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null))", + "code": "attachment.update(\n [attachment.file_id],\n [attachment.digest],\n where=(attachment.collision == 0)\n | (attachment.collision == Null))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -256,7 +256,7 @@ "*attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null))" ], "kwargs": {}, - "code": "cursor.execute(*attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null)))", + "code": "(Transaction().connection.cursor()).execute(*attachment.update(\n [attachment.file_id],\n [Concat(Concat(attachment.digest, '-'),\n attachment.collision)],\n where=(attachment.collision != 0)\n & (attachment.collision != Null)))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -274,7 +274,7 @@ "kwargs": { "where": "(attachment.collision != 0) & (attachment.collision != Null)" }, - "code": "attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null))", + "code": "attachment.update(\n [attachment.file_id],\n [Concat(Concat(attachment.digest, '-'),\n attachment.collision)],\n where=(attachment.collision != 0)\n & (attachment.collision != Null))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -386,7 +386,7 @@ "*model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button'))" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button')))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n [model_data.module], ['ir'],\n where=((model_data.module == 'res')\n & (model_data.fs_id == 'model_data_sync_button'))))", "phase": "after_super" }, { @@ -403,7 +403,7 @@ "kwargs": { "where": "(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button')" }, - "code": "model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button'))", + "code": "model_data.update(\n [model_data.module], ['ir'],\n where=((model_data.module == 'res')\n & (model_data.fs_id == 'model_data_sync_button')))", "phase": "after_super" }, { @@ -458,7 +458,7 @@ "*sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed')" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed'))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.state], ['activated'],\n where=sql_table.state == 'installed'))", "phase": "after_super" }, { @@ -475,7 +475,7 @@ "kwargs": { "where": "sql_table.state == 'installed'" }, - "code": "sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed')", + "code": "sql_table.update(\n [sql_table.state], ['activated'],\n where=sql_table.state == 'installed')", "phase": "after_super" }, { @@ -489,7 +489,7 @@ "*sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled')" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled'))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.state], ['not activated'],\n where=sql_table.state == 'uninstalled'))", "phase": "after_super" }, { @@ -506,7 +506,7 @@ "kwargs": { "where": "sql_table.state == 'uninstalled'" }, - "code": "sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled')", + "code": "sql_table.update(\n [sql_table.state], ['not activated'],\n where=sql_table.state == 'uninstalled')", "phase": "after_super" }, { @@ -520,7 +520,7 @@ "*model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids))" ], "kwargs": {}, - "code": "cursor.execute(*model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids)))", + "code": "(Transaction().connection.cursor()).execute(*model_data_sql_table.update(\n [model_data_sql_table.module], ['ir'],\n where=((model_data_sql_table.module == 'res')\n & (model_data_sql_table.fs_id.in_(button_fs_ids)))))", "phase": "after_super" }, { @@ -537,7 +537,7 @@ "kwargs": { "where": "(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids)" }, - "code": "model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids))", + "code": "model_data_sql_table.update(\n [model_data_sql_table.module], ['ir'],\n where=((model_data_sql_table.module == 'res')\n & (model_data_sql_table.fs_id.in_(button_fs_ids))))", "phase": "after_super" } ] @@ -601,7 +601,7 @@ "*model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item')" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item'))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n columns=[model_data.model],\n values=[cls.__name__],\n where=(model_data.model\n == 'ir.module.module.config_wizard.item')))", "phase": "before_super" }, { @@ -617,7 +617,7 @@ "values": "[cls.__name__]", "where": "model_data.model == 'ir.module.module.config_wizard.item'" }, - "code": "model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item')", + "code": "model_data.update(\n columns=[model_data.model],\n values=[cls.__name__],\n where=(model_data.model\n == 'ir.module.module.config_wizard.item'))", "phase": "before_super" }, { @@ -656,7 +656,7 @@ "kwargs": { "action": "'add'" }, - "code": "table_h.index_action([queue.scheduled_at.nulls_first, queue.expected_at.nulls_first, queue.dequeued_at, queue.name], action='add')", + "code": "table_h.index_action([\n queue.scheduled_at.nulls_first,\n queue.expected_at.nulls_first,\n queue.dequeued_at,\n queue.name,\n ], action='add')", "phase": "after_super" } ] @@ -703,7 +703,7 @@ "*table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code))" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.sequence_type],\n sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code)))", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -720,7 +720,7 @@ "sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)" ], "kwargs": {}, - "code": "table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code))", + "code": "table.update(\n [table.sequence_type],\n sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code))", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -737,7 +737,7 @@ "kwargs": { "where": "sequence_type.code == table.code" }, - "code": "sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)", + "code": "sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code)", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -828,7 +828,7 @@ "*ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt')" ], "kwargs": {}, - "code": "cursor.execute(*ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt'))", + "code": "(transaction.connection.cursor()).execute(*ir_translation.update(\n [ir_translation.type],\n ['report'],\n where=ir_translation.type == 'odt'))", "phase": "after_super" }, { @@ -845,7 +845,7 @@ "kwargs": { "where": "ir_translation.type == 'odt'" }, - "code": "ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt')", + "code": "ir_translation.update(\n [ir_translation.type],\n ['report'],\n where=ir_translation.type == 'odt')", "phase": "after_super" }, { @@ -882,7 +882,7 @@ "*sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null)" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.select(\n sql_table.id, sql_table.minimum_delay,\n where=sql_table.minimum_delay != Null))", "phase": "after_super", "condition": "table.column_exist('minimum_delay')" }, @@ -900,7 +900,7 @@ "kwargs": { "where": "sql_table.minimum_delay != Null" }, - "code": "sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null)", + "code": "sql_table.select(\n sql_table.id, sql_table.minimum_delay,\n where=sql_table.minimum_delay != Null)", "phase": "after_super", "condition": "table.column_exist('minimum_delay')" }, @@ -932,7 +932,7 @@ "kwargs": { "where": "model.id == sql_table.action_model" }, - "code": "model.select(model.model, where=model.id == sql_table.action_model)", + "code": "model.select(\n model.model, where=model.id == sql_table.(model.select(\n model.model, where=model.id == sql_table.action_model)))", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -947,7 +947,7 @@ "*sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))])" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))]))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.action],\n [Concat((model.select(\n model.model, where=model.id == sql_table.action_model)), Concat(\n '|', sql_table.action_function))]))", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -963,7 +963,7 @@ "[Concat(action_model, Concat('|', sql_table.action_function))]" ], "kwargs": {}, - "code": "sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))])", + "code": "sql_table.update(\n [sql_table.action],\n [Concat((model.select(\n model.model, where=model.id == sql_table.action_model)), Concat(\n '|', sql_table.action_function))])", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -978,7 +978,7 @@ "'action_model'" ], "kwargs": {}, - "code": "table_h.drop_column('action_model')", + "code": "table_h.drop_column('(model.select(\n model.model, where=model.id == sql_table.action_model))')", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, diff --git a/data/6.4/party.json b/data/6.4/party.json index d865d90..93c9c91 100644 --- a/data/6.4/party.json +++ b/data/6.4/party.json @@ -34,7 +34,7 @@ "*sql_table.update([sql_table.street], [value])" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.street], [value]))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.street],\n [value]))", "phase": "after_super", "condition": "table.column_exist('streetbis')" }, @@ -50,7 +50,7 @@ "[value]" ], "kwargs": {}, - "code": "sql_table.update([sql_table.street], [value])", + "code": "sql_table.update(\n [sql_table.street],\n [value])", "phase": "after_super", "condition": "table.column_exist('streetbis')" }, @@ -90,7 +90,7 @@ "country.select(country.code, where=country.id == table.country)" ], "kwargs": {}, - "code": "table.update([table.country_code], country.select(country.code, where=country.id == table.country))", + "code": "table.update(\n [table.country_code],\n country.select(\n country.code,\n where=country.id == table.country))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -107,7 +107,7 @@ "kwargs": { "where": "country.id == table.country" }, - "code": "country.select(country.code, where=country.id == table.country)", + "code": "country.select(\n country.code,\n where=country.id == table.country)", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -120,7 +120,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -152,7 +152,7 @@ "language.select(Substring(language.code, 0, 2), where=language.id == table.language)" ], "kwargs": {}, - "code": "table.update([table.language_code], language.select(Substring(language.code, 0, 2), where=language.id == table.language))", + "code": "table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -169,7 +169,7 @@ "kwargs": { "where": "language.id == table.language" }, - "code": "language.select(Substring(language.code, 0, 2), where=language.id == table.language)", + "code": "language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language)", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -182,7 +182,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -301,7 +301,7 @@ "party.select(party.id, party.lang)" ], "kwargs": {}, - "code": "table.insert([table.party, table.lang], party.select(party.id, party.lang))", + "code": "table.insert(\n [table.party, table.lang],\n party.select(party.id, party.lang))", "phase": "after_super", "condition": "party_h.column_exist('lang')" }, @@ -330,7 +330,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.insert(\n [table.party, table.lang],\n party.select(party.id, party.lang))))", "phase": "after_super", "condition": "party_h.column_exist('lang')" }, @@ -368,7 +368,7 @@ "*party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null))" ], "kwargs": {}, - "code": "cursor.execute(*party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null)))", + "code": "(Transaction().connection.cursor()).execute(*party.select(\n party.id, party.vat_number, party.vat_country,\n where=(party.vat_number != Null)\n | (party.vat_country != Null)))", "phase": "after_super", "condition": "party_h.column_exist('vat_number') and party_h.column_exist('vat_country')" }, @@ -387,7 +387,7 @@ "kwargs": { "where": "(party.vat_number != Null) | (party.vat_country != Null)" }, - "code": "party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null))", + "code": "party.select(\n party.id, party.vat_number, party.vat_country,\n where=(party.vat_number != Null)\n | (party.vat_country != Null))", "phase": "after_super", "condition": "party_h.column_exist('vat_number') and party_h.column_exist('vat_country')" }, @@ -432,7 +432,7 @@ "*table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit'))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.type], ['cn_ric'],\n where=(table.type == 'cn_rit')))", "phase": "after_super" }, { @@ -449,7 +449,7 @@ "kwargs": { "where": "table.type == 'cn_rit'" }, - "code": "table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit')", + "code": "table.update([table.type], ['cn_ric'],\n where=(table.type == 'cn_rit'))", "phase": "after_super" } ] diff --git a/data/6.4/product.json b/data/6.4/product.json index 047668d..6a9f5ec 100644 --- a/data/6.4/product.json +++ b/data/6.4/product.json @@ -41,7 +41,7 @@ "*table.update([table.suffix_code], [table.code])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.suffix_code], [table.code]))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.suffix_code],\n [table.code]))", "phase": "after_super", "condition": "fill_suffix_code" }, @@ -57,7 +57,7 @@ "[table.code]" ], "kwargs": {}, - "code": "table.update([table.suffix_code], [table.code])", + "code": "table.update(\n [table.suffix_code],\n [table.code])", "phase": "after_super", "condition": "fill_suffix_code" } @@ -114,7 +114,7 @@ "ProductCostPrice._table" ], "kwargs": {}, - "code": "backend.TableHandler.table_exist(ProductCostPrice._table)", + "code": "backend.TableHandler.table_exist(\n ProductCostPrice._table)", "phase": "before_super" }, { @@ -129,7 +129,7 @@ "*sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns]))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns])))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns])))", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" }, @@ -146,7 +146,7 @@ "columns": "[Column(sql_table, c) for c in columns]", "values": "cost_price.select(*[Column(cost_price, c) for c in columns])" }, - "code": "sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns]))", + "code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns]))", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" }, @@ -161,7 +161,7 @@ "*[Column(cost_price, c) for c in columns]" ], "kwargs": {}, - "code": "cost_price.select(*[Column(cost_price, c) for c in columns])", + "code": "cost_price.select(\n *[Column(cost_price, c) for c in columns])", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" } @@ -214,7 +214,7 @@ "*sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null)))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -230,7 +230,7 @@ "columns": "[Column(sql_table, c) for c in columns] + [sql_table.product]", "values": "sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))" }, - "code": "sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null)))", + "code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -245,7 +245,7 @@ "kwargs": { "where": "(sql_table.template != Null) & (sql_table.product == Null)" }, - "code": "sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))", + "code": "sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -260,7 +260,7 @@ "*sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null)))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -275,7 +275,7 @@ "kwargs": { "where": "(sql_table.template != Null) & (sql_table.product == Null)" }, - "code": "sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null))", + "code": "sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null))", "phase": "after_super", "condition": "table.column_exist('template')" }, diff --git a/data/6.4/production.json b/data/6.4/production.json index 67dce26..04d384d 100644 --- a/data/6.4/production.json +++ b/data/6.4/production.json @@ -79,7 +79,7 @@ "*table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null))" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null)))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.planned_start_date],\n [table.planned_date],\n where=(table.planned_start_date == Null)\n & (table.planned_date != Null)))", "phase": "after_super" }, { @@ -96,7 +96,7 @@ "kwargs": { "where": "(table.planned_start_date == Null) & (table.planned_date != Null)" }, - "code": "table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null))", + "code": "table.update(\n [table.planned_start_date],\n [table.planned_date],\n where=(table.planned_start_date == Null)\n & (table.planned_date != Null))", "phase": "after_super" }, { @@ -110,7 +110,7 @@ "*table.update([table.state], ['cancelled'], where=table.state == 'cancel')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.state], ['cancelled'], where=table.state == 'cancel'))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.state], ['cancelled'],\n where=table.state == 'cancel'))", "phase": "after_super" }, { @@ -127,7 +127,7 @@ "kwargs": { "where": "table.state == 'cancel'" }, - "code": "table.update([table.state], ['cancelled'], where=table.state == 'cancel')", + "code": "table.update(\n [table.state], ['cancelled'],\n where=table.state == 'cancel')", "phase": "after_super" } ] diff --git a/data/6.4/res.json b/data/6.4/res.json index 6a7434e..25dd282 100644 --- a/data/6.4/res.json +++ b/data/6.4/res.json @@ -19,7 +19,7 @@ "*sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new])" ], "kwargs": {}, - "code": "cursor.execute(*sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new]))", + "code": "(Transaction().connection.cursor()).execute(*sqltable.update(\n columns=[sqltable.password_hash],\n values=[password_hash_new]))", "phase": "after_super", "condition": "table.column_exist('password') and table.column_exist('salt')" }, @@ -35,7 +35,7 @@ "columns": "[sqltable.password_hash]", "values": "[password_hash_new]" }, - "code": "sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new])", + "code": "sqltable.update(\n columns=[sqltable.password_hash],\n values=[password_hash_new])", "phase": "after_super", "condition": "table.column_exist('password') and table.column_exist('salt')" }, @@ -96,7 +96,7 @@ "*model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin'))" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin')))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n [model_data.noupdate], [True],\n where=(model_data.model == cls.__name__)\n & (model_data.module == 'res')\n & (model_data.fs_id == 'user_admin')))", "phase": "after_super" }, { @@ -113,7 +113,7 @@ "kwargs": { "where": "(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin')" }, - "code": "model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin'))", + "code": "model_data.update(\n [model_data.noupdate], [True],\n where=(model_data.model == cls.__name__)\n & (model_data.module == 'res')\n & (model_data.fs_id == 'user_admin'))", "phase": "after_super" } ] diff --git a/data/6.4/stock_lot.json b/data/6.4/stock_lot.json index 1ee2378..b9ca05c 100644 --- a/data/6.4/stock_lot.json +++ b/data/6.4/stock_lot.json @@ -17,7 +17,7 @@ "*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)" ], "kwargs": {}, - "code": "cursor_select.execute(*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template))", + "code": "(connection.cursor()).execute(*template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template))", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" }, @@ -32,7 +32,7 @@ "kwargs": { "distinct_on": "template_lot_type.template" }, - "code": "template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)", + "code": "template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template)", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" } diff --git a/data/6.6/company.json b/data/6.6/company.json index 9f5a54e..5235b56 100644 --- a/data/6.6/company.json +++ b/data/6.6/company.json @@ -64,7 +64,7 @@ "*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null))" ], "kwargs": {}, - "code": "cursor.execute(*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null)))", + "code": "(transaction.connection.cursor()).execute(*user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.main_company,\n where=table.main_company != Null)))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -81,7 +81,7 @@ "table.select(table.id, table.main_company, where=table.main_company != Null)" ], "kwargs": {}, - "code": "user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null))", + "code": "user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.main_company,\n where=table.main_company != Null))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -99,7 +99,7 @@ "kwargs": { "where": "table.main_company != Null" }, - "code": "table.select(table.id, table.main_company, where=table.main_company != Null)", + "code": "table.select(\n table.id, table.main_company,\n where=table.main_company != Null)", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -115,7 +115,7 @@ "*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company)))" ], "kwargs": {}, - "code": "cursor.execute(*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))))", + "code": "(transaction.connection.cursor()).execute(*user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company))))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -132,7 +132,7 @@ "table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))" ], "kwargs": {}, - "code": "user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company)))", + "code": "user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company)))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -150,7 +150,7 @@ "kwargs": { "where": "(table.company != Null) & (table.company != table.main_company)" }, - "code": "table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))", + "code": "table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, diff --git a/data/6.6/country.json b/data/6.6/country.json index 8704693..5258c72 100644 --- a/data/6.6/country.json +++ b/data/6.6/country.json @@ -62,7 +62,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -76,7 +76,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" } ] @@ -98,7 +98,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -112,7 +112,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" }, { diff --git a/data/6.6/currency.json b/data/6.6/currency.json index e09ea75..3f930b3 100644 --- a/data/6.6/currency.json +++ b/data/6.6/currency.json @@ -19,7 +19,7 @@ "*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -33,7 +33,7 @@ "kwargs": { "where": "(data.module == 'currency') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__))", "phase": "after_super" } ] diff --git a/data/6.6/ir.json b/data/6.6/ir.json index 403078f..04af018 100644 --- a/data/6.6/ir.json +++ b/data/6.6/ir.json @@ -33,7 +33,7 @@ "*action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain')" ], "kwargs": {}, - "code": "cursor.execute(*action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain'))", + "code": "(transaction.connection.cursor()).execute(*action_report.update(\n [action_report.extension],\n ['txt'],\n where=action_report.extension == 'plain'))", "phase": "after_super" }, { @@ -50,7 +50,7 @@ "kwargs": { "where": "action_report.extension == 'plain'" }, - "code": "action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain')", + "code": "action_report.update(\n [action_report.extension],\n ['txt'],\n where=action_report.extension == 'plain')", "phase": "after_super" } ] @@ -115,7 +115,7 @@ "*act_window.update([act_window.limit], [Null], where=act_window.limit == 0)" ], "kwargs": {}, - "code": "cursor.execute(*act_window.update([act_window.limit], [Null], where=act_window.limit == 0))", + "code": "(Transaction().connection.cursor()).execute(*act_window.update(\n [act_window.limit], [Null],\n where=act_window.limit == 0))", "phase": "after_super" }, { @@ -132,7 +132,7 @@ "kwargs": { "where": "act_window.limit == 0" }, - "code": "act_window.update([act_window.limit], [Null], where=act_window.limit == 0)", + "code": "act_window.update(\n [act_window.limit], [Null],\n where=act_window.limit == 0)", "phase": "after_super" } ] @@ -200,7 +200,7 @@ "*attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null))" ], "kwargs": {}, - "code": "cursor.execute(*attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null)))", + "code": "(Transaction().connection.cursor()).execute(*attachment.update(\n [attachment.file_id],\n [attachment.digest],\n where=(attachment.collision == 0)\n | (attachment.collision == Null)))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -218,7 +218,7 @@ "kwargs": { "where": "(attachment.collision == 0) | (attachment.collision == Null)" }, - "code": "attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null))", + "code": "attachment.update(\n [attachment.file_id],\n [attachment.digest],\n where=(attachment.collision == 0)\n | (attachment.collision == Null))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -233,7 +233,7 @@ "*attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null))" ], "kwargs": {}, - "code": "cursor.execute(*attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null)))", + "code": "(Transaction().connection.cursor()).execute(*attachment.update(\n [attachment.file_id],\n [Concat(Concat(attachment.digest, '-'),\n attachment.collision)],\n where=(attachment.collision != 0)\n & (attachment.collision != Null)))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -251,7 +251,7 @@ "kwargs": { "where": "(attachment.collision != 0) & (attachment.collision != Null)" }, - "code": "attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null))", + "code": "attachment.update(\n [attachment.file_id],\n [Concat(Concat(attachment.digest, '-'),\n attachment.collision)],\n where=(attachment.collision != 0)\n & (attachment.collision != Null))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -363,7 +363,7 @@ "*model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button'))" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button')))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n [model_data.module], ['ir'],\n where=((model_data.module == 'res')\n & (model_data.fs_id == 'model_data_sync_button'))))", "phase": "after_super" }, { @@ -380,7 +380,7 @@ "kwargs": { "where": "(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button')" }, - "code": "model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button'))", + "code": "model_data.update(\n [model_data.module], ['ir'],\n where=((model_data.module == 'res')\n & (model_data.fs_id == 'model_data_sync_button')))", "phase": "after_super" }, { @@ -435,7 +435,7 @@ "*sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed')" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed'))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.state], ['activated'],\n where=sql_table.state == 'installed'))", "phase": "after_super" }, { @@ -452,7 +452,7 @@ "kwargs": { "where": "sql_table.state == 'installed'" }, - "code": "sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed')", + "code": "sql_table.update(\n [sql_table.state], ['activated'],\n where=sql_table.state == 'installed')", "phase": "after_super" }, { @@ -466,7 +466,7 @@ "*sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled')" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled'))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.state], ['not activated'],\n where=sql_table.state == 'uninstalled'))", "phase": "after_super" }, { @@ -483,7 +483,7 @@ "kwargs": { "where": "sql_table.state == 'uninstalled'" }, - "code": "sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled')", + "code": "sql_table.update(\n [sql_table.state], ['not activated'],\n where=sql_table.state == 'uninstalled')", "phase": "after_super" }, { @@ -497,7 +497,7 @@ "*model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids))" ], "kwargs": {}, - "code": "cursor.execute(*model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids)))", + "code": "(Transaction().connection.cursor()).execute(*model_data_sql_table.update(\n [model_data_sql_table.module], ['ir'],\n where=((model_data_sql_table.module == 'res')\n & (model_data_sql_table.fs_id.in_(button_fs_ids)))))", "phase": "after_super" }, { @@ -514,7 +514,7 @@ "kwargs": { "where": "(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids)" }, - "code": "model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids))", + "code": "model_data_sql_table.update(\n [model_data_sql_table.module], ['ir'],\n where=((model_data_sql_table.module == 'res')\n & (model_data_sql_table.fs_id.in_(button_fs_ids))))", "phase": "after_super" } ] @@ -578,7 +578,7 @@ "*model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item')" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item'))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n columns=[model_data.model],\n values=[cls.__name__],\n where=(model_data.model\n == 'ir.module.module.config_wizard.item')))", "phase": "before_super" }, { @@ -594,7 +594,7 @@ "values": "[cls.__name__]", "where": "model_data.model == 'ir.module.module.config_wizard.item'" }, - "code": "model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item')", + "code": "model_data.update(\n columns=[model_data.model],\n values=[cls.__name__],\n where=(model_data.model\n == 'ir.module.module.config_wizard.item'))", "phase": "before_super" }, { @@ -656,7 +656,7 @@ "*table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code))" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.sequence_type],\n sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code)))", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -673,7 +673,7 @@ "sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)" ], "kwargs": {}, - "code": "table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code))", + "code": "table.update(\n [table.sequence_type],\n sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code))", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -690,7 +690,7 @@ "kwargs": { "where": "sequence_type.code == table.code" }, - "code": "sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)", + "code": "sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code)", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -758,7 +758,7 @@ "*ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt')" ], "kwargs": {}, - "code": "cursor.execute(*ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt'))", + "code": "(transaction.connection.cursor()).execute(*ir_translation.update(\n [ir_translation.type],\n ['report'],\n where=ir_translation.type == 'odt'))", "phase": "after_super" }, { @@ -775,7 +775,7 @@ "kwargs": { "where": "ir_translation.type == 'odt'" }, - "code": "ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt')", + "code": "ir_translation.update(\n [ir_translation.type],\n ['report'],\n where=ir_translation.type == 'odt')", "phase": "after_super" } ] @@ -797,7 +797,7 @@ "*sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null)" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.select(\n sql_table.id, sql_table.minimum_delay,\n where=sql_table.minimum_delay != Null))", "phase": "after_super", "condition": "table.column_exist('minimum_delay')" }, @@ -815,7 +815,7 @@ "kwargs": { "where": "sql_table.minimum_delay != Null" }, - "code": "sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null)", + "code": "sql_table.select(\n sql_table.id, sql_table.minimum_delay,\n where=sql_table.minimum_delay != Null)", "phase": "after_super", "condition": "table.column_exist('minimum_delay')" }, @@ -847,7 +847,7 @@ "kwargs": { "where": "model.id == sql_table.action_model" }, - "code": "model.select(model.model, where=model.id == sql_table.action_model)", + "code": "model.select(\n model.model, where=model.id == sql_table.(model.select(\n model.model, where=model.id == sql_table.action_model)))", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -862,7 +862,7 @@ "*sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))])" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))]))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.action],\n [Concat((model.select(\n model.model, where=model.id == sql_table.action_model)), Concat(\n '|', sql_table.action_function))]))", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -878,7 +878,7 @@ "[Concat(action_model, Concat('|', sql_table.action_function))]" ], "kwargs": {}, - "code": "sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))])", + "code": "sql_table.update(\n [sql_table.action],\n [Concat((model.select(\n model.model, where=model.id == sql_table.action_model)), Concat(\n '|', sql_table.action_function))])", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -893,7 +893,7 @@ "'action_model'" ], "kwargs": {}, - "code": "table_h.drop_column('action_model')", + "code": "table_h.drop_column('(model.select(\n model.model, where=model.id == sql_table.action_model))')", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, diff --git a/data/6.6/party.json b/data/6.6/party.json index a5f0d02..6eb6801 100644 --- a/data/6.6/party.json +++ b/data/6.6/party.json @@ -34,7 +34,7 @@ "*sql_table.update([sql_table.street], [value])" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.street], [value]))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.street],\n [value]))", "phase": "after_super", "condition": "table.column_exist('streetbis')" }, @@ -50,7 +50,7 @@ "[value]" ], "kwargs": {}, - "code": "sql_table.update([sql_table.street], [value])", + "code": "sql_table.update(\n [sql_table.street],\n [value])", "phase": "after_super", "condition": "table.column_exist('streetbis')" }, @@ -90,7 +90,7 @@ "country.select(country.code, where=country.id == table.country)" ], "kwargs": {}, - "code": "table.update([table.country_code], country.select(country.code, where=country.id == table.country))", + "code": "table.update(\n [table.country_code],\n country.select(\n country.code,\n where=country.id == table.country))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -107,7 +107,7 @@ "kwargs": { "where": "country.id == table.country" }, - "code": "country.select(country.code, where=country.id == table.country)", + "code": "country.select(\n country.code,\n where=country.id == table.country)", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -120,7 +120,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -152,7 +152,7 @@ "language.select(Substring(language.code, 0, 2), where=language.id == table.language)" ], "kwargs": {}, - "code": "table.update([table.language_code], language.select(Substring(language.code, 0, 2), where=language.id == table.language))", + "code": "table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -169,7 +169,7 @@ "kwargs": { "where": "language.id == table.language" }, - "code": "language.select(Substring(language.code, 0, 2), where=language.id == table.language)", + "code": "language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language)", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -182,7 +182,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -301,7 +301,7 @@ "party.select(party.id, party.lang)" ], "kwargs": {}, - "code": "table.insert([table.party, table.lang], party.select(party.id, party.lang))", + "code": "table.insert(\n [table.party, table.lang],\n party.select(party.id, party.lang))", "phase": "after_super", "condition": "party_h.column_exist('lang')" }, @@ -330,7 +330,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.insert(\n [table.party, table.lang],\n party.select(party.id, party.lang))))", "phase": "after_super", "condition": "party_h.column_exist('lang')" }, @@ -368,7 +368,7 @@ "*party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null))" ], "kwargs": {}, - "code": "cursor.execute(*party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null)))", + "code": "(Transaction().connection.cursor()).execute(*party.select(\n party.id, party.vat_number, party.vat_country,\n where=(party.vat_number != Null)\n | (party.vat_country != Null)))", "phase": "after_super", "condition": "party_h.column_exist('vat_number') and party_h.column_exist('vat_country')" }, @@ -387,7 +387,7 @@ "kwargs": { "where": "(party.vat_number != Null) | (party.vat_country != Null)" }, - "code": "party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null))", + "code": "party.select(\n party.id, party.vat_number, party.vat_country,\n where=(party.vat_number != Null)\n | (party.vat_country != Null))", "phase": "after_super", "condition": "party_h.column_exist('vat_number') and party_h.column_exist('vat_country')" }, @@ -432,7 +432,7 @@ "*table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit'))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.type], ['cn_ric'],\n where=(table.type == 'cn_rit')))", "phase": "after_super" }, { @@ -449,7 +449,7 @@ "kwargs": { "where": "table.type == 'cn_rit'" }, - "code": "table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit')", + "code": "table.update([table.type], ['cn_ric'],\n where=(table.type == 'cn_rit'))", "phase": "after_super" } ] diff --git a/data/6.6/product.json b/data/6.6/product.json index 62f42a5..310c379 100644 --- a/data/6.6/product.json +++ b/data/6.6/product.json @@ -41,7 +41,7 @@ "*table.update([table.suffix_code], [table.code])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.suffix_code], [table.code]))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.suffix_code],\n [table.code]))", "phase": "after_super", "condition": "fill_suffix_code" }, @@ -57,7 +57,7 @@ "[table.code]" ], "kwargs": {}, - "code": "table.update([table.suffix_code], [table.code])", + "code": "table.update(\n [table.suffix_code],\n [table.code])", "phase": "after_super", "condition": "fill_suffix_code" } @@ -114,7 +114,7 @@ "ProductCostPrice._table" ], "kwargs": {}, - "code": "backend.TableHandler.table_exist(ProductCostPrice._table)", + "code": "backend.TableHandler.table_exist(\n ProductCostPrice._table)", "phase": "before_super" }, { @@ -129,7 +129,7 @@ "*sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns]))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns])))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns])))", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" }, @@ -146,7 +146,7 @@ "columns": "[Column(sql_table, c) for c in columns]", "values": "cost_price.select(*[Column(cost_price, c) for c in columns])" }, - "code": "sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns]))", + "code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns]))", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" }, @@ -161,7 +161,7 @@ "*[Column(cost_price, c) for c in columns]" ], "kwargs": {}, - "code": "cost_price.select(*[Column(cost_price, c) for c in columns])", + "code": "cost_price.select(\n *[Column(cost_price, c) for c in columns])", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" } @@ -214,7 +214,7 @@ "*sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null)))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -230,7 +230,7 @@ "columns": "[Column(sql_table, c) for c in columns] + [sql_table.product]", "values": "sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))" }, - "code": "sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null)))", + "code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -245,7 +245,7 @@ "kwargs": { "where": "(sql_table.template != Null) & (sql_table.product == Null)" }, - "code": "sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))", + "code": "sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -260,7 +260,7 @@ "*sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null)))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -275,7 +275,7 @@ "kwargs": { "where": "(sql_table.template != Null) & (sql_table.product == Null)" }, - "code": "sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null))", + "code": "sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null))", "phase": "after_super", "condition": "table.column_exist('template')" }, diff --git a/data/6.6/production.json b/data/6.6/production.json index 4312c2f..170ade2 100644 --- a/data/6.6/production.json +++ b/data/6.6/production.json @@ -79,7 +79,7 @@ "*table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null))" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null)))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.planned_start_date],\n [table.planned_date],\n where=(table.planned_start_date == Null)\n & (table.planned_date != Null)))", "phase": "after_super" }, { @@ -96,7 +96,7 @@ "kwargs": { "where": "(table.planned_start_date == Null) & (table.planned_date != Null)" }, - "code": "table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null))", + "code": "table.update(\n [table.planned_start_date],\n [table.planned_date],\n where=(table.planned_start_date == Null)\n & (table.planned_date != Null))", "phase": "after_super" }, { @@ -110,7 +110,7 @@ "*table.update([table.state], ['cancelled'], where=table.state == 'cancel')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.state], ['cancelled'], where=table.state == 'cancel'))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.state], ['cancelled'],\n where=table.state == 'cancel'))", "phase": "after_super" }, { @@ -127,7 +127,7 @@ "kwargs": { "where": "table.state == 'cancel'" }, - "code": "table.update([table.state], ['cancelled'], where=table.state == 'cancel')", + "code": "table.update(\n [table.state], ['cancelled'],\n where=table.state == 'cancel')", "phase": "after_super" } ] diff --git a/data/6.6/res.json b/data/6.6/res.json index 7efb6aa..6bf9494 100644 --- a/data/6.6/res.json +++ b/data/6.6/res.json @@ -19,7 +19,7 @@ "*sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new])" ], "kwargs": {}, - "code": "cursor.execute(*sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new]))", + "code": "(Transaction().connection.cursor()).execute(*sqltable.update(\n columns=[sqltable.password_hash],\n values=[password_hash_new]))", "phase": "after_super", "condition": "table.column_exist('password') and table.column_exist('salt')" }, @@ -35,7 +35,7 @@ "columns": "[sqltable.password_hash]", "values": "[password_hash_new]" }, - "code": "sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new])", + "code": "sqltable.update(\n columns=[sqltable.password_hash],\n values=[password_hash_new])", "phase": "after_super", "condition": "table.column_exist('password') and table.column_exist('salt')" }, @@ -96,7 +96,7 @@ "*model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin'))" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin')))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n [model_data.noupdate], [True],\n where=(model_data.model == cls.__name__)\n & (model_data.module == 'res')\n & (model_data.fs_id == 'user_admin')))", "phase": "after_super" }, { @@ -113,7 +113,7 @@ "kwargs": { "where": "(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin')" }, - "code": "model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin'))", + "code": "model_data.update(\n [model_data.noupdate], [True],\n where=(model_data.model == cls.__name__)\n & (model_data.module == 'res')\n & (model_data.fs_id == 'user_admin'))", "phase": "after_super" } ] diff --git a/data/6.6/stock_lot.json b/data/6.6/stock_lot.json index 899c62d..1132d26 100644 --- a/data/6.6/stock_lot.json +++ b/data/6.6/stock_lot.json @@ -17,7 +17,7 @@ "*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)" ], "kwargs": {}, - "code": "cursor_select.execute(*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template))", + "code": "(connection.cursor()).execute(*template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template))", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" }, @@ -32,7 +32,7 @@ "kwargs": { "distinct_on": "template_lot_type.template" }, - "code": "template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)", + "code": "template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template)", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" } diff --git a/data/6.8/company.json b/data/6.8/company.json index 28bc296..4d58f82 100644 --- a/data/6.8/company.json +++ b/data/6.8/company.json @@ -64,7 +64,7 @@ "*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null))" ], "kwargs": {}, - "code": "cursor.execute(*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null)))", + "code": "(transaction.connection.cursor()).execute(*user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.main_company,\n where=table.main_company != Null)))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -81,7 +81,7 @@ "table.select(table.id, table.main_company, where=table.main_company != Null)" ], "kwargs": {}, - "code": "user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null))", + "code": "user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.main_company,\n where=table.main_company != Null))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -99,7 +99,7 @@ "kwargs": { "where": "table.main_company != Null" }, - "code": "table.select(table.id, table.main_company, where=table.main_company != Null)", + "code": "table.select(\n table.id, table.main_company,\n where=table.main_company != Null)", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -115,7 +115,7 @@ "*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company)))" ], "kwargs": {}, - "code": "cursor.execute(*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))))", + "code": "(transaction.connection.cursor()).execute(*user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company))))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -132,7 +132,7 @@ "table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))" ], "kwargs": {}, - "code": "user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company)))", + "code": "user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company)))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -150,7 +150,7 @@ "kwargs": { "where": "(table.company != Null) & (table.company != table.main_company)" }, - "code": "table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))", + "code": "table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, diff --git a/data/6.8/country.json b/data/6.8/country.json index 6346b38..d47001b 100644 --- a/data/6.8/country.json +++ b/data/6.8/country.json @@ -62,7 +62,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -76,7 +76,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" } ] @@ -98,7 +98,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -112,7 +112,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" }, { diff --git a/data/6.8/currency.json b/data/6.8/currency.json index 21673b3..63b7fc2 100644 --- a/data/6.8/currency.json +++ b/data/6.8/currency.json @@ -19,7 +19,7 @@ "*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -33,7 +33,7 @@ "kwargs": { "where": "(data.module == 'currency') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__))", "phase": "after_super" }, { diff --git a/data/6.8/ir.json b/data/6.8/ir.json index a321b14..ef0b046 100644 --- a/data/6.8/ir.json +++ b/data/6.8/ir.json @@ -33,7 +33,7 @@ "*action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain')" ], "kwargs": {}, - "code": "cursor.execute(*action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain'))", + "code": "(transaction.connection.cursor()).execute(*action_report.update(\n [action_report.extension],\n ['txt'],\n where=action_report.extension == 'plain'))", "phase": "after_super" }, { @@ -50,7 +50,7 @@ "kwargs": { "where": "action_report.extension == 'plain'" }, - "code": "action_report.update([action_report.extension], ['txt'], where=action_report.extension == 'plain')", + "code": "action_report.update(\n [action_report.extension],\n ['txt'],\n where=action_report.extension == 'plain')", "phase": "after_super" } ] @@ -115,7 +115,7 @@ "*act_window.update([act_window.limit], [Null], where=act_window.limit == 0)" ], "kwargs": {}, - "code": "cursor.execute(*act_window.update([act_window.limit], [Null], where=act_window.limit == 0))", + "code": "(Transaction().connection.cursor()).execute(*act_window.update(\n [act_window.limit], [Null],\n where=act_window.limit == 0))", "phase": "after_super" }, { @@ -132,7 +132,7 @@ "kwargs": { "where": "act_window.limit == 0" }, - "code": "act_window.update([act_window.limit], [Null], where=act_window.limit == 0)", + "code": "act_window.update(\n [act_window.limit], [Null],\n where=act_window.limit == 0)", "phase": "after_super" } ] @@ -200,7 +200,7 @@ "*attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null))" ], "kwargs": {}, - "code": "cursor.execute(*attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null)))", + "code": "(Transaction().connection.cursor()).execute(*attachment.update(\n [attachment.file_id],\n [attachment.digest],\n where=(attachment.collision == 0)\n | (attachment.collision == Null)))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -218,7 +218,7 @@ "kwargs": { "where": "(attachment.collision == 0) | (attachment.collision == Null)" }, - "code": "attachment.update([attachment.file_id], [attachment.digest], where=(attachment.collision == 0) | (attachment.collision == Null))", + "code": "attachment.update(\n [attachment.file_id],\n [attachment.digest],\n where=(attachment.collision == 0)\n | (attachment.collision == Null))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -233,7 +233,7 @@ "*attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null))" ], "kwargs": {}, - "code": "cursor.execute(*attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null)))", + "code": "(Transaction().connection.cursor()).execute(*attachment.update(\n [attachment.file_id],\n [Concat(Concat(attachment.digest, '-'),\n attachment.collision)],\n where=(attachment.collision != 0)\n & (attachment.collision != Null)))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -251,7 +251,7 @@ "kwargs": { "where": "(attachment.collision != 0) & (attachment.collision != Null)" }, - "code": "attachment.update([attachment.file_id], [Concat(Concat(attachment.digest, '-'), attachment.collision)], where=(attachment.collision != 0) & (attachment.collision != Null))", + "code": "attachment.update(\n [attachment.file_id],\n [Concat(Concat(attachment.digest, '-'),\n attachment.collision)],\n where=(attachment.collision != 0)\n & (attachment.collision != Null))", "phase": "after_super", "condition": "table.column_exist('digest') and table.column_exist('collision')" }, @@ -363,7 +363,7 @@ "*model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button'))" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button')))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n [model_data.module], ['ir'],\n where=((model_data.module == 'res')\n & (model_data.fs_id == 'model_data_sync_button'))))", "phase": "after_super" }, { @@ -380,7 +380,7 @@ "kwargs": { "where": "(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button')" }, - "code": "model_data.update([model_data.module], ['ir'], where=(model_data.module == 'res') & (model_data.fs_id == 'model_data_sync_button'))", + "code": "model_data.update(\n [model_data.module], ['ir'],\n where=((model_data.module == 'res')\n & (model_data.fs_id == 'model_data_sync_button')))", "phase": "after_super" }, { @@ -435,7 +435,7 @@ "*sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed')" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed'))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.state], ['activated'],\n where=sql_table.state == 'installed'))", "phase": "after_super" }, { @@ -452,7 +452,7 @@ "kwargs": { "where": "sql_table.state == 'installed'" }, - "code": "sql_table.update([sql_table.state], ['activated'], where=sql_table.state == 'installed')", + "code": "sql_table.update(\n [sql_table.state], ['activated'],\n where=sql_table.state == 'installed')", "phase": "after_super" }, { @@ -466,7 +466,7 @@ "*sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled')" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled'))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.state], ['not activated'],\n where=sql_table.state == 'uninstalled'))", "phase": "after_super" }, { @@ -483,7 +483,7 @@ "kwargs": { "where": "sql_table.state == 'uninstalled'" }, - "code": "sql_table.update([sql_table.state], ['not activated'], where=sql_table.state == 'uninstalled')", + "code": "sql_table.update(\n [sql_table.state], ['not activated'],\n where=sql_table.state == 'uninstalled')", "phase": "after_super" }, { @@ -497,7 +497,7 @@ "*model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids))" ], "kwargs": {}, - "code": "cursor.execute(*model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids)))", + "code": "(Transaction().connection.cursor()).execute(*model_data_sql_table.update(\n [model_data_sql_table.module], ['ir'],\n where=((model_data_sql_table.module == 'res')\n & (model_data_sql_table.fs_id.in_(button_fs_ids)))))", "phase": "after_super" }, { @@ -514,7 +514,7 @@ "kwargs": { "where": "(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids)" }, - "code": "model_data_sql_table.update([model_data_sql_table.module], ['ir'], where=(model_data_sql_table.module == 'res') & model_data_sql_table.fs_id.in_(button_fs_ids))", + "code": "model_data_sql_table.update(\n [model_data_sql_table.module], ['ir'],\n where=((model_data_sql_table.module == 'res')\n & (model_data_sql_table.fs_id.in_(button_fs_ids))))", "phase": "after_super" } ] @@ -578,7 +578,7 @@ "*model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item')" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item'))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n columns=[model_data.model],\n values=[cls.__name__],\n where=(model_data.model\n == 'ir.module.module.config_wizard.item')))", "phase": "before_super" }, { @@ -594,7 +594,7 @@ "values": "[cls.__name__]", "where": "model_data.model == 'ir.module.module.config_wizard.item'" }, - "code": "model_data.update(columns=[model_data.model], values=[cls.__name__], where=model_data.model == 'ir.module.module.config_wizard.item')", + "code": "model_data.update(\n columns=[model_data.model],\n values=[cls.__name__],\n where=(model_data.model\n == 'ir.module.module.config_wizard.item'))", "phase": "before_super" }, { @@ -656,7 +656,7 @@ "*table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code))" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.sequence_type],\n sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code)))", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -673,7 +673,7 @@ "sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)" ], "kwargs": {}, - "code": "table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code))", + "code": "table.update(\n [table.sequence_type],\n sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code))", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -690,7 +690,7 @@ "kwargs": { "where": "sequence_type.code == table.code" }, - "code": "sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)", + "code": "sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code)", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -758,7 +758,7 @@ "*ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt')" ], "kwargs": {}, - "code": "cursor.execute(*ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt'))", + "code": "(transaction.connection.cursor()).execute(*ir_translation.update(\n [ir_translation.type],\n ['report'],\n where=ir_translation.type == 'odt'))", "phase": "after_super" }, { @@ -775,7 +775,7 @@ "kwargs": { "where": "ir_translation.type == 'odt'" }, - "code": "ir_translation.update([ir_translation.type], ['report'], where=ir_translation.type == 'odt')", + "code": "ir_translation.update(\n [ir_translation.type],\n ['report'],\n where=ir_translation.type == 'odt')", "phase": "after_super" } ] @@ -797,7 +797,7 @@ "*sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null)" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.select(\n sql_table.id, sql_table.minimum_delay,\n where=sql_table.minimum_delay != Null))", "phase": "after_super", "condition": "table.column_exist('minimum_delay')" }, @@ -815,7 +815,7 @@ "kwargs": { "where": "sql_table.minimum_delay != Null" }, - "code": "sql_table.select(sql_table.id, sql_table.minimum_delay, where=sql_table.minimum_delay != Null)", + "code": "sql_table.select(\n sql_table.id, sql_table.minimum_delay,\n where=sql_table.minimum_delay != Null)", "phase": "after_super", "condition": "table.column_exist('minimum_delay')" }, @@ -847,7 +847,7 @@ "kwargs": { "where": "model.id == sql_table.action_model" }, - "code": "model.select(model.model, where=model.id == sql_table.action_model)", + "code": "model.select(\n model.model, where=model.id == sql_table.(model.select(\n model.model, where=model.id == sql_table.action_model)))", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -862,7 +862,7 @@ "*sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))])" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))]))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.action],\n [Concat((model.select(\n model.model, where=model.id == sql_table.action_model)), Concat(\n '|', sql_table.action_function))]))", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -878,7 +878,7 @@ "[Concat(action_model, Concat('|', sql_table.action_function))]" ], "kwargs": {}, - "code": "sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))])", + "code": "sql_table.update(\n [sql_table.action],\n [Concat((model.select(\n model.model, where=model.id == sql_table.action_model)), Concat(\n '|', sql_table.action_function))])", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -893,7 +893,7 @@ "'action_model'" ], "kwargs": {}, - "code": "table_h.drop_column('action_model')", + "code": "table_h.drop_column('(model.select(\n model.model, where=model.id == sql_table.action_model))')", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, diff --git a/data/6.8/party.json b/data/6.8/party.json index ac4ba1c..b8e8d05 100644 --- a/data/6.8/party.json +++ b/data/6.8/party.json @@ -34,7 +34,7 @@ "*sql_table.update([sql_table.street], [value])" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.street], [value]))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.street],\n [value]))", "phase": "after_super", "condition": "table.column_exist('streetbis')" }, @@ -50,7 +50,7 @@ "[value]" ], "kwargs": {}, - "code": "sql_table.update([sql_table.street], [value])", + "code": "sql_table.update(\n [sql_table.street],\n [value])", "phase": "after_super", "condition": "table.column_exist('streetbis')" }, @@ -90,7 +90,7 @@ "country.select(country.code, where=country.id == table.country)" ], "kwargs": {}, - "code": "table.update([table.country_code], country.select(country.code, where=country.id == table.country))", + "code": "table.update(\n [table.country_code],\n country.select(\n country.code,\n where=country.id == table.country))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -107,7 +107,7 @@ "kwargs": { "where": "country.id == table.country" }, - "code": "country.select(country.code, where=country.id == table.country)", + "code": "country.select(\n country.code,\n where=country.id == table.country)", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -120,7 +120,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -152,7 +152,7 @@ "language.select(Substring(language.code, 0, 2), where=language.id == table.language)" ], "kwargs": {}, - "code": "table.update([table.language_code], language.select(Substring(language.code, 0, 2), where=language.id == table.language))", + "code": "table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -169,7 +169,7 @@ "kwargs": { "where": "language.id == table.language" }, - "code": "language.select(Substring(language.code, 0, 2), where=language.id == table.language)", + "code": "language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language)", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -182,7 +182,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -301,7 +301,7 @@ "party.select(party.id, party.lang)" ], "kwargs": {}, - "code": "table.insert([table.party, table.lang], party.select(party.id, party.lang))", + "code": "table.insert(\n [table.party, table.lang],\n party.select(party.id, party.lang))", "phase": "after_super", "condition": "party_h.column_exist('lang')" }, @@ -330,7 +330,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.insert(\n [table.party, table.lang],\n party.select(party.id, party.lang))))", "phase": "after_super", "condition": "party_h.column_exist('lang')" }, @@ -368,7 +368,7 @@ "*party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null))" ], "kwargs": {}, - "code": "cursor.execute(*party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null)))", + "code": "(Transaction().connection.cursor()).execute(*party.select(\n party.id, party.vat_number, party.vat_country,\n where=(party.vat_number != Null)\n | (party.vat_country != Null)))", "phase": "after_super", "condition": "party_h.column_exist('vat_number') and party_h.column_exist('vat_country')" }, @@ -387,7 +387,7 @@ "kwargs": { "where": "(party.vat_number != Null) | (party.vat_country != Null)" }, - "code": "party.select(party.id, party.vat_number, party.vat_country, where=(party.vat_number != Null) | (party.vat_country != Null))", + "code": "party.select(\n party.id, party.vat_number, party.vat_country,\n where=(party.vat_number != Null)\n | (party.vat_country != Null))", "phase": "after_super", "condition": "party_h.column_exist('vat_number') and party_h.column_exist('vat_country')" }, @@ -432,7 +432,7 @@ "*table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit'))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.type], ['cn_ric'],\n where=(table.type == 'cn_rit')))", "phase": "after_super" }, { @@ -449,7 +449,7 @@ "kwargs": { "where": "table.type == 'cn_rit'" }, - "code": "table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit')", + "code": "table.update([table.type], ['cn_ric'],\n where=(table.type == 'cn_rit'))", "phase": "after_super" } ] diff --git a/data/6.8/product.json b/data/6.8/product.json index 71bb3a4..673fda1 100644 --- a/data/6.8/product.json +++ b/data/6.8/product.json @@ -41,7 +41,7 @@ "*table.update([table.suffix_code], [table.code])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.suffix_code], [table.code]))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.suffix_code],\n [table.code]))", "phase": "after_super", "condition": "fill_suffix_code" }, @@ -57,7 +57,7 @@ "[table.code]" ], "kwargs": {}, - "code": "table.update([table.suffix_code], [table.code])", + "code": "table.update(\n [table.suffix_code],\n [table.code])", "phase": "after_super", "condition": "fill_suffix_code" } @@ -114,7 +114,7 @@ "ProductCostPrice._table" ], "kwargs": {}, - "code": "backend.TableHandler.table_exist(ProductCostPrice._table)", + "code": "backend.TableHandler.table_exist(\n ProductCostPrice._table)", "phase": "before_super" }, { @@ -129,7 +129,7 @@ "*sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns]))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns])))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns])))", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" }, @@ -146,7 +146,7 @@ "columns": "[Column(sql_table, c) for c in columns]", "values": "cost_price.select(*[Column(cost_price, c) for c in columns])" }, - "code": "sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns]))", + "code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns]))", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" }, @@ -161,7 +161,7 @@ "*[Column(cost_price, c) for c in columns]" ], "kwargs": {}, - "code": "cost_price.select(*[Column(cost_price, c) for c in columns])", + "code": "cost_price.select(\n *[Column(cost_price, c) for c in columns])", "phase": "after_super", "condition": "cost_price_table.column_exist('template')" } @@ -214,7 +214,7 @@ "*sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null)))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -230,7 +230,7 @@ "columns": "[Column(sql_table, c) for c in columns] + [sql_table.product]", "values": "sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))" }, - "code": "sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null)))", + "code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -245,7 +245,7 @@ "kwargs": { "where": "(sql_table.template != Null) & (sql_table.product == Null)" }, - "code": "sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))", + "code": "sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -260,7 +260,7 @@ "*sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null))" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null)))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))", "phase": "after_super", "condition": "table.column_exist('template')" }, @@ -275,7 +275,7 @@ "kwargs": { "where": "(sql_table.template != Null) & (sql_table.product == Null)" }, - "code": "sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null))", + "code": "sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null))", "phase": "after_super", "condition": "table.column_exist('template')" }, diff --git a/data/6.8/production.json b/data/6.8/production.json index ca030a4..b936c7d 100644 --- a/data/6.8/production.json +++ b/data/6.8/production.json @@ -79,7 +79,7 @@ "*table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null))" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null)))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.planned_start_date],\n [table.planned_date],\n where=(table.planned_start_date == Null)\n & (table.planned_date != Null)))", "phase": "after_super" }, { @@ -96,7 +96,7 @@ "kwargs": { "where": "(table.planned_start_date == Null) & (table.planned_date != Null)" }, - "code": "table.update([table.planned_start_date], [table.planned_date], where=(table.planned_start_date == Null) & (table.planned_date != Null))", + "code": "table.update(\n [table.planned_start_date],\n [table.planned_date],\n where=(table.planned_start_date == Null)\n & (table.planned_date != Null))", "phase": "after_super" }, { @@ -110,7 +110,7 @@ "*table.update([table.state], ['cancelled'], where=table.state == 'cancel')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.state], ['cancelled'], where=table.state == 'cancel'))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.state], ['cancelled'],\n where=table.state == 'cancel'))", "phase": "after_super" }, { @@ -127,7 +127,7 @@ "kwargs": { "where": "table.state == 'cancel'" }, - "code": "table.update([table.state], ['cancelled'], where=table.state == 'cancel')", + "code": "table.update(\n [table.state], ['cancelled'],\n where=table.state == 'cancel')", "phase": "after_super" } ] diff --git a/data/6.8/res.json b/data/6.8/res.json index cd3544c..b835a21 100644 --- a/data/6.8/res.json +++ b/data/6.8/res.json @@ -19,7 +19,7 @@ "*sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new])" ], "kwargs": {}, - "code": "cursor.execute(*sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new]))", + "code": "(Transaction().connection.cursor()).execute(*sqltable.update(\n columns=[sqltable.password_hash],\n values=[password_hash_new]))", "phase": "after_super", "condition": "table.column_exist('password') and table.column_exist('salt')" }, @@ -35,7 +35,7 @@ "columns": "[sqltable.password_hash]", "values": "[password_hash_new]" }, - "code": "sqltable.update(columns=[sqltable.password_hash], values=[password_hash_new])", + "code": "sqltable.update(\n columns=[sqltable.password_hash],\n values=[password_hash_new])", "phase": "after_super", "condition": "table.column_exist('password') and table.column_exist('salt')" }, @@ -96,7 +96,7 @@ "*model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin'))" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin')))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n [model_data.noupdate], [True],\n where=(model_data.model == cls.__name__)\n & (model_data.module == 'res')\n & (model_data.fs_id == 'user_admin')))", "phase": "after_super" }, { @@ -113,7 +113,7 @@ "kwargs": { "where": "(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin')" }, - "code": "model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin'))", + "code": "model_data.update(\n [model_data.noupdate], [True],\n where=(model_data.model == cls.__name__)\n & (model_data.module == 'res')\n & (model_data.fs_id == 'user_admin'))", "phase": "after_super" } ] diff --git a/data/6.8/stock_lot.json b/data/6.8/stock_lot.json index 27f5d4b..1c13893 100644 --- a/data/6.8/stock_lot.json +++ b/data/6.8/stock_lot.json @@ -17,7 +17,7 @@ "*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)" ], "kwargs": {}, - "code": "cursor_select.execute(*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template))", + "code": "(connection.cursor()).execute(*template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template))", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" }, @@ -32,7 +32,7 @@ "kwargs": { "distinct_on": "template_lot_type.template" }, - "code": "template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)", + "code": "template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template)", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" } diff --git a/data/7.0/company.json b/data/7.0/company.json index bcc5bf7..1b493fe 100644 --- a/data/7.0/company.json +++ b/data/7.0/company.json @@ -20,7 +20,7 @@ "*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null))" ], "kwargs": {}, - "code": "cursor.execute(*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null)))", + "code": "(transaction.connection.cursor()).execute(*user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.main_company,\n where=table.main_company != Null)))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -37,7 +37,7 @@ "table.select(table.id, table.main_company, where=table.main_company != Null)" ], "kwargs": {}, - "code": "user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null))", + "code": "user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.main_company,\n where=table.main_company != Null))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -55,7 +55,7 @@ "kwargs": { "where": "table.main_company != Null" }, - "code": "table.select(table.id, table.main_company, where=table.main_company != Null)", + "code": "table.select(\n table.id, table.main_company,\n where=table.main_company != Null)", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -71,7 +71,7 @@ "*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company)))" ], "kwargs": {}, - "code": "cursor.execute(*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))))", + "code": "(transaction.connection.cursor()).execute(*user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company))))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -88,7 +88,7 @@ "table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))" ], "kwargs": {}, - "code": "user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company)))", + "code": "user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company)))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -106,7 +106,7 @@ "kwargs": { "where": "(table.company != Null) & (table.company != table.main_company)" }, - "code": "table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))", + "code": "table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, diff --git a/data/7.0/country.json b/data/7.0/country.json index a7a399a..5f96de2 100644 --- a/data/7.0/country.json +++ b/data/7.0/country.json @@ -19,7 +19,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -33,7 +33,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" } ] @@ -55,7 +55,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -69,7 +69,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" }, { diff --git a/data/7.0/currency.json b/data/7.0/currency.json index 0580794..7588066 100644 --- a/data/7.0/currency.json +++ b/data/7.0/currency.json @@ -19,7 +19,7 @@ "*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -33,7 +33,7 @@ "kwargs": { "where": "(data.module == 'currency') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__))", "phase": "after_super" }, { diff --git a/data/7.0/ir.json b/data/7.0/ir.json index 372c829..c064832 100644 --- a/data/7.0/ir.json +++ b/data/7.0/ir.json @@ -88,7 +88,7 @@ "*table.update([table.user], [table.create_uid])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.user], [table.create_uid]))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.user], [table.create_uid]))", "phase": "after_super", "condition": "not user_exists" }, @@ -221,7 +221,7 @@ "*table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code))" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.sequence_type],\n sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code)))", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -238,7 +238,7 @@ "sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)" ], "kwargs": {}, - "code": "table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code))", + "code": "table.update(\n [table.sequence_type],\n sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code))", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -255,7 +255,7 @@ "kwargs": { "where": "sequence_type.code == table.code" }, - "code": "sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)", + "code": "sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code)", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -333,7 +333,7 @@ "kwargs": { "where": "model.id == sql_table.action_model" }, - "code": "model.select(model.model, where=model.id == sql_table.action_model)", + "code": "model.select(\n model.model, where=model.id == sql_table.(model.select(\n model.model, where=model.id == sql_table.action_model)))", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -348,7 +348,7 @@ "*sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))])" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))]))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.action],\n [Concat((model.select(\n model.model, where=model.id == sql_table.action_model)), Concat(\n '|', sql_table.action_function))]))", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -364,7 +364,7 @@ "[Concat(action_model, Concat('|', sql_table.action_function))]" ], "kwargs": {}, - "code": "sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))])", + "code": "sql_table.update(\n [sql_table.action],\n [Concat((model.select(\n model.model, where=model.id == sql_table.action_model)), Concat(\n '|', sql_table.action_function))])", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -379,7 +379,7 @@ "'action_model'" ], "kwargs": {}, - "code": "table_h.drop_column('action_model')", + "code": "table_h.drop_column('(model.select(\n model.model, where=model.id == sql_table.action_model))')", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, diff --git a/data/7.0/party.json b/data/7.0/party.json index c019d70..51e8d2e 100644 --- a/data/7.0/party.json +++ b/data/7.0/party.json @@ -44,7 +44,7 @@ "country.select(country.code, where=country.id == table.country)" ], "kwargs": {}, - "code": "table.update([table.country_code], country.select(country.code, where=country.id == table.country))", + "code": "table.update(\n [table.country_code],\n country.select(\n country.code,\n where=country.id == table.country))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -61,7 +61,7 @@ "kwargs": { "where": "country.id == table.country" }, - "code": "country.select(country.code, where=country.id == table.country)", + "code": "country.select(\n country.code,\n where=country.id == table.country)", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -74,7 +74,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -106,7 +106,7 @@ "language.select(Substring(language.code, 0, 2), where=language.id == table.language)" ], "kwargs": {}, - "code": "table.update([table.language_code], language.select(Substring(language.code, 0, 2), where=language.id == table.language))", + "code": "table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -123,7 +123,7 @@ "kwargs": { "where": "language.id == table.language" }, - "code": "language.select(Substring(language.code, 0, 2), where=language.id == table.language)", + "code": "language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language)", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -136,7 +136,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -174,7 +174,7 @@ "*table.update([table.identifier_types], [cls.identifier_types.sql_format(identifier_types)])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.identifier_types], [cls.identifier_types.sql_format(identifier_types)]))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.identifier_types],\n [cls.identifier_types.sql_format(identifier_types)]\n ))", "phase": "after_super", "condition": "configuration.identifier_types != identifier_types" }, @@ -190,7 +190,7 @@ "[cls.identifier_types.sql_format(identifier_types)]" ], "kwargs": {}, - "code": "table.update([table.identifier_types], [cls.identifier_types.sql_format(identifier_types)])", + "code": "table.update(\n [table.identifier_types],\n [cls.identifier_types.sql_format(identifier_types)]\n )", "phase": "after_super", "condition": "configuration.identifier_types != identifier_types" } @@ -213,7 +213,7 @@ "*table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit'))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.type], ['cn_ric'],\n where=(table.type == 'cn_rit')))", "phase": "after_super" }, { @@ -230,7 +230,7 @@ "kwargs": { "where": "table.type == 'cn_rit'" }, - "code": "table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit')", + "code": "table.update([table.type], ['cn_ric'],\n where=(table.type == 'cn_rit'))", "phase": "after_super" } ] diff --git a/data/7.0/product.json b/data/7.0/product.json index ab62a2b..3fbfd0b 100644 --- a/data/7.0/product.json +++ b/data/7.0/product.json @@ -19,7 +19,7 @@ "*table.update([table.suffix_code], [table.code])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.suffix_code], [table.code]))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.suffix_code],\n [table.code]))", "phase": "after_super", "condition": "fill_suffix_code" }, @@ -35,7 +35,7 @@ "[table.code]" ], "kwargs": {}, - "code": "table.update([table.suffix_code], [table.code])", + "code": "table.update(\n [table.suffix_code],\n [table.code])", "phase": "after_super", "condition": "fill_suffix_code" } diff --git a/data/7.0/production.json b/data/7.0/production.json index dff6194..f902066 100644 --- a/data/7.0/production.json +++ b/data/7.0/production.json @@ -73,7 +73,7 @@ "*table.update([table.state], ['cancelled'], where=table.state == 'cancel')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.state], ['cancelled'], where=table.state == 'cancel'))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.state], ['cancelled'],\n where=table.state == 'cancel'))", "phase": "after_super" }, { @@ -90,7 +90,7 @@ "kwargs": { "where": "table.state == 'cancel'" }, - "code": "table.update([table.state], ['cancelled'], where=table.state == 'cancel')", + "code": "table.update(\n [table.state], ['cancelled'],\n where=table.state == 'cancel')", "phase": "after_super" } ] diff --git a/data/7.0/res.json b/data/7.0/res.json index 52f4b0c..688af6a 100644 --- a/data/7.0/res.json +++ b/data/7.0/res.json @@ -19,7 +19,7 @@ "*model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin'))" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin')))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n [model_data.noupdate], [True],\n where=(model_data.model == cls.__name__)\n & (model_data.module == 'res')\n & (model_data.fs_id == 'user_admin')))", "phase": "after_super" }, { @@ -36,7 +36,7 @@ "kwargs": { "where": "(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin')" }, - "code": "model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin'))", + "code": "model_data.update(\n [model_data.noupdate], [True],\n where=(model_data.model == cls.__name__)\n & (model_data.module == 'res')\n & (model_data.fs_id == 'user_admin'))", "phase": "after_super" } ] diff --git a/data/7.0/stock_lot.json b/data/7.0/stock_lot.json index 668e7a6..25f0ea6 100644 --- a/data/7.0/stock_lot.json +++ b/data/7.0/stock_lot.json @@ -17,7 +17,7 @@ "*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)" ], "kwargs": {}, - "code": "cursor_select.execute(*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template))", + "code": "(connection.cursor()).execute(*template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template))", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" }, @@ -32,7 +32,7 @@ "kwargs": { "distinct_on": "template_lot_type.template" }, - "code": "template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)", + "code": "template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template)", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" } diff --git a/data/7.2/company.json b/data/7.2/company.json index 17e5de6..c9d8763 100644 --- a/data/7.2/company.json +++ b/data/7.2/company.json @@ -44,7 +44,7 @@ "*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null))" ], "kwargs": {}, - "code": "cursor.execute(*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null)))", + "code": "(transaction.connection.cursor()).execute(*user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.main_company,\n where=table.main_company != Null)))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -61,7 +61,7 @@ "table.select(table.id, table.main_company, where=table.main_company != Null)" ], "kwargs": {}, - "code": "user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null))", + "code": "user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.main_company,\n where=table.main_company != Null))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -79,7 +79,7 @@ "kwargs": { "where": "table.main_company != Null" }, - "code": "table.select(table.id, table.main_company, where=table.main_company != Null)", + "code": "table.select(\n table.id, table.main_company,\n where=table.main_company != Null)", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -95,7 +95,7 @@ "*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company)))" ], "kwargs": {}, - "code": "cursor.execute(*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))))", + "code": "(transaction.connection.cursor()).execute(*user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company))))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -112,7 +112,7 @@ "table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))" ], "kwargs": {}, - "code": "user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company)))", + "code": "user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company)))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -130,7 +130,7 @@ "kwargs": { "where": "(table.company != Null) & (table.company != table.main_company)" }, - "code": "table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))", + "code": "table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, diff --git a/data/7.2/country.json b/data/7.2/country.json index a277a34..8ea9918 100644 --- a/data/7.2/country.json +++ b/data/7.2/country.json @@ -19,7 +19,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -33,7 +33,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" } ] @@ -55,7 +55,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -69,7 +69,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" }, { diff --git a/data/7.2/currency.json b/data/7.2/currency.json index 3f7973b..263129c 100644 --- a/data/7.2/currency.json +++ b/data/7.2/currency.json @@ -19,7 +19,7 @@ "*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -33,7 +33,7 @@ "kwargs": { "where": "(data.module == 'currency') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__))", "phase": "after_super" }, { diff --git a/data/7.2/ir.json b/data/7.2/ir.json index 73a9a88..d7b0d8e 100644 --- a/data/7.2/ir.json +++ b/data/7.2/ir.json @@ -88,7 +88,7 @@ "*table.update([table.user], [table.create_uid])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.user], [table.create_uid]))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.user], [table.create_uid]))", "phase": "after_super", "condition": "not user_exists" }, @@ -159,7 +159,7 @@ "*table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model], [model.model],\n from_=[model],\n where=table._temp_model == model.id))", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -178,7 +178,7 @@ "from_": "[model]", "where": "table._temp_model == model.id" }, - "code": "table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id)", + "code": "table.update(\n [table.model], [model.model],\n from_=[model],\n where=table._temp_model == model.id)", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -248,7 +248,7 @@ "*table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model], [model.model],\n from_=[model],\n where=table._temp_model == model.id))", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -267,7 +267,7 @@ "from_": "[model]", "where": "table._temp_model == model.id" }, - "code": "table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id)", + "code": "table.update(\n [table.model], [model.model],\n from_=[model],\n where=table._temp_model == model.id)", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -353,7 +353,7 @@ "*table.update([table.model, table.field], [field.model, field.name], from_=[field], where=table._temp_field == field.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model, table.field], [field.model, field.name], from_=[field], where=table._temp_field == field.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model, table.field],\n [field.model, field.name],\n from_=[field],\n where=table._temp_field == field.id))", "phase": "before_super", "condition": "table_h.column_exist('field') and table_h.column_is_type('field', 'INTEGER')" }, @@ -372,7 +372,7 @@ "from_": "[field]", "where": "table._temp_field == field.id" }, - "code": "table.update([table.model, table.field], [field.model, field.name], from_=[field], where=table._temp_field == field.id)", + "code": "table.update(\n [table.model, table.field],\n [field.model, field.name],\n from_=[field],\n where=table._temp_field == field.id)", "phase": "before_super", "condition": "table_h.column_exist('field') and table_h.column_is_type('field', 'INTEGER')" }, @@ -442,7 +442,7 @@ "*table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model], [model.model],\n from_=[model],\n where=table._temp_model == model.id))", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -461,7 +461,7 @@ "from_": "[model]", "where": "table._temp_model == model.id" }, - "code": "table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id)", + "code": "table.update(\n [table.model], [model.model],\n from_=[model],\n where=table._temp_model == model.id)", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -592,7 +592,7 @@ "*table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model], [model.model],\n from_=[model],\n where=table._temp_model == model.id))", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -611,7 +611,7 @@ "from_": "[model]", "where": "table._temp_model == model.id" }, - "code": "table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id)", + "code": "table.update(\n [table.model], [model.model],\n from_=[model],\n where=table._temp_model == model.id)", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -674,7 +674,7 @@ "*table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code))" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.sequence_type],\n sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code)))", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -691,7 +691,7 @@ "sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)" ], "kwargs": {}, - "code": "table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code))", + "code": "table.update(\n [table.sequence_type],\n sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code))", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -708,7 +708,7 @@ "kwargs": { "where": "sequence_type.code == table.code" }, - "code": "sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)", + "code": "sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code)", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -786,7 +786,7 @@ "kwargs": { "where": "model.id == sql_table.action_model" }, - "code": "model.select(model.model, where=model.id == sql_table.action_model)", + "code": "model.select(\n model.model, where=model.id == sql_table.(model.select(\n model.model, where=model.id == sql_table.action_model)))", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -801,7 +801,7 @@ "*sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))])" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))]))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.action],\n [Concat((model.select(\n model.model, where=model.id == sql_table.action_model)), Concat(\n '|', sql_table.action_function))]))", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -817,7 +817,7 @@ "[Concat(action_model, Concat('|', sql_table.action_function))]" ], "kwargs": {}, - "code": "sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))])", + "code": "sql_table.update(\n [sql_table.action],\n [Concat((model.select(\n model.model, where=model.id == sql_table.action_model)), Concat(\n '|', sql_table.action_function))])", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -832,7 +832,7 @@ "'action_model'" ], "kwargs": {}, - "code": "table_h.drop_column('action_model')", + "code": "table_h.drop_column('(model.select(\n model.model, where=model.id == sql_table.action_model))')", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, diff --git a/data/7.2/party.json b/data/7.2/party.json index 51ca4f1..8378488 100644 --- a/data/7.2/party.json +++ b/data/7.2/party.json @@ -44,7 +44,7 @@ "country.select(country.code, where=country.id == table.country)" ], "kwargs": {}, - "code": "table.update([table.country_code], country.select(country.code, where=country.id == table.country))", + "code": "table.update(\n [table.country_code],\n country.select(\n country.code,\n where=country.id == table.country))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -61,7 +61,7 @@ "kwargs": { "where": "country.id == table.country" }, - "code": "country.select(country.code, where=country.id == table.country)", + "code": "country.select(\n country.code,\n where=country.id == table.country)", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -74,7 +74,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -106,7 +106,7 @@ "language.select(Substring(language.code, 0, 2), where=language.id == table.language)" ], "kwargs": {}, - "code": "table.update([table.language_code], language.select(Substring(language.code, 0, 2), where=language.id == table.language))", + "code": "table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -123,7 +123,7 @@ "kwargs": { "where": "language.id == table.language" }, - "code": "language.select(Substring(language.code, 0, 2), where=language.id == table.language)", + "code": "language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language)", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -136,7 +136,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -174,7 +174,7 @@ "*table.update([table.identifier_types], [cls.identifier_types.sql_format(identifier_types)])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.identifier_types], [cls.identifier_types.sql_format(identifier_types)]))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.identifier_types],\n [cls.identifier_types.sql_format(identifier_types)]\n ))", "phase": "after_super", "condition": "configuration.identifier_types != identifier_types" }, @@ -190,7 +190,7 @@ "[cls.identifier_types.sql_format(identifier_types)]" ], "kwargs": {}, - "code": "table.update([table.identifier_types], [cls.identifier_types.sql_format(identifier_types)])", + "code": "table.update(\n [table.identifier_types],\n [cls.identifier_types.sql_format(identifier_types)]\n )", "phase": "after_super", "condition": "configuration.identifier_types != identifier_types" } @@ -237,7 +237,7 @@ "*table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit'))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.type], ['cn_ric'],\n where=(table.type == 'cn_rit')))", "phase": "after_super" }, { @@ -254,7 +254,7 @@ "kwargs": { "where": "table.type == 'cn_rit'" }, - "code": "table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit')", + "code": "table.update([table.type], ['cn_ric'],\n where=(table.type == 'cn_rit'))", "phase": "after_super" } ] diff --git a/data/7.2/product.json b/data/7.2/product.json index 00783a4..79434c2 100644 --- a/data/7.2/product.json +++ b/data/7.2/product.json @@ -19,7 +19,7 @@ "*table.update([table.suffix_code], [table.code])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.suffix_code], [table.code]))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.suffix_code],\n [table.code]))", "phase": "after_super", "condition": "fill_suffix_code" }, @@ -35,7 +35,7 @@ "[table.code]" ], "kwargs": {}, - "code": "table.update([table.suffix_code], [table.code])", + "code": "table.update(\n [table.suffix_code],\n [table.code])", "phase": "after_super", "condition": "fill_suffix_code" } diff --git a/data/7.2/production.json b/data/7.2/production.json index 84eeec4..3cffe43 100644 --- a/data/7.2/production.json +++ b/data/7.2/production.json @@ -57,7 +57,7 @@ "*table.update([table.method], ['ir.cron|stock_shipment_assign_try'], where=table.method == 'production|assign_cron')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.method], ['ir.cron|stock_shipment_assign_try'], where=table.method == 'production|assign_cron'))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.method], ['ir.cron|stock_shipment_assign_try'],\n where=table.method == 'production|assign_cron'))", "phase": "after_super" }, { @@ -74,7 +74,7 @@ "kwargs": { "where": "table.method == 'production|assign_cron'" }, - "code": "table.update([table.method], ['ir.cron|stock_shipment_assign_try'], where=table.method == 'production|assign_cron')", + "code": "table.update(\n [table.method], ['ir.cron|stock_shipment_assign_try'],\n where=table.method == 'production|assign_cron')", "phase": "after_super" } ] @@ -112,7 +112,7 @@ "*table.update([table.state], ['cancelled'], where=table.state == 'cancel')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.state], ['cancelled'], where=table.state == 'cancel'))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.state], ['cancelled'],\n where=table.state == 'cancel'))", "phase": "after_super" }, { @@ -129,7 +129,7 @@ "kwargs": { "where": "table.state == 'cancel'" }, - "code": "table.update([table.state], ['cancelled'], where=table.state == 'cancel')", + "code": "table.update(\n [table.state], ['cancelled'],\n where=table.state == 'cancel')", "phase": "after_super" } ] diff --git a/data/7.2/res.json b/data/7.2/res.json index 7a2f4d8..b7161ac 100644 --- a/data/7.2/res.json +++ b/data/7.2/res.json @@ -19,7 +19,7 @@ "*model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin'))" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin')))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n [model_data.noupdate], [True],\n where=(model_data.model == cls.__name__)\n & (model_data.module == 'res')\n & (model_data.fs_id == 'user_admin')))", "phase": "after_super" }, { @@ -36,7 +36,7 @@ "kwargs": { "where": "(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin')" }, - "code": "model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin'))", + "code": "model_data.update(\n [model_data.noupdate], [True],\n where=(model_data.model == cls.__name__)\n & (model_data.module == 'res')\n & (model_data.fs_id == 'user_admin'))", "phase": "after_super" } ] diff --git a/data/7.2/stock_lot.json b/data/7.2/stock_lot.json index 8335b52..45bf4ae 100644 --- a/data/7.2/stock_lot.json +++ b/data/7.2/stock_lot.json @@ -17,7 +17,7 @@ "*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)" ], "kwargs": {}, - "code": "cursor_select.execute(*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template))", + "code": "(connection.cursor()).execute(*template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template))", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" }, @@ -32,7 +32,7 @@ "kwargs": { "distinct_on": "template_lot_type.template" }, - "code": "template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)", + "code": "template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template)", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" } diff --git a/data/7.4/company.json b/data/7.4/company.json index 997431d..b8b3e79 100644 --- a/data/7.4/company.json +++ b/data/7.4/company.json @@ -44,7 +44,7 @@ "*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null))" ], "kwargs": {}, - "code": "cursor.execute(*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null)))", + "code": "(transaction.connection.cursor()).execute(*user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.main_company,\n where=table.main_company != Null)))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -61,7 +61,7 @@ "table.select(table.id, table.main_company, where=table.main_company != Null)" ], "kwargs": {}, - "code": "user_company.insert([user_company.user, user_company.company], table.select(table.id, table.main_company, where=table.main_company != Null))", + "code": "user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.main_company,\n where=table.main_company != Null))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -79,7 +79,7 @@ "kwargs": { "where": "table.main_company != Null" }, - "code": "table.select(table.id, table.main_company, where=table.main_company != Null)", + "code": "table.select(\n table.id, table.main_company,\n where=table.main_company != Null)", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -95,7 +95,7 @@ "*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company)))" ], "kwargs": {}, - "code": "cursor.execute(*user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))))", + "code": "(transaction.connection.cursor()).execute(*user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company))))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -112,7 +112,7 @@ "table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))" ], "kwargs": {}, - "code": "user_company.insert([user_company.user, user_company.company], table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company)))", + "code": "user_company.insert(\n [user_company.user, user_company.company],\n table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company)))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, @@ -130,7 +130,7 @@ "kwargs": { "where": "(table.company != Null) & (table.company != table.main_company)" }, - "code": "table.select(table.id, table.company, where=(table.company != Null) & (table.company != table.main_company))", + "code": "table.select(\n table.id, table.company,\n where=(table.company != Null)\n & (table.company != table.main_company))", "phase": "after_super", "condition": "table_h.column_exist('main_company')" }, diff --git a/data/7.4/country.json b/data/7.4/country.json index d7e9c0a..d496d7c 100644 --- a/data/7.4/country.json +++ b/data/7.4/country.json @@ -19,7 +19,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -33,7 +33,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" } ] @@ -55,7 +55,7 @@ "*data.delete(where=(data.module == 'country') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'country') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -69,7 +69,7 @@ "kwargs": { "where": "(data.module == 'country') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'country') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'country')\n & (data.model == cls.__name__))", "phase": "after_super" }, { diff --git a/data/7.4/currency.json b/data/7.4/currency.json index 5c2f383..ee50d03 100644 --- a/data/7.4/currency.json +++ b/data/7.4/currency.json @@ -19,7 +19,7 @@ "*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))" ], "kwargs": {}, - "code": "cursor.execute(*data.delete(where=(data.module == 'currency') & (data.model == cls.__name__)))", + "code": "(Transaction().connection.cursor()).execute(*data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__)))", "phase": "after_super" }, { @@ -33,7 +33,7 @@ "kwargs": { "where": "(data.module == 'currency') & (data.model == cls.__name__)" }, - "code": "data.delete(where=(data.module == 'currency') & (data.model == cls.__name__))", + "code": "data.delete(where=(data.module == 'currency')\n & (data.model == cls.__name__))", "phase": "after_super" }, { diff --git a/data/7.4/ir.json b/data/7.4/ir.json index a709560..9fcc4b1 100644 --- a/data/7.4/ir.json +++ b/data/7.4/ir.json @@ -88,7 +88,7 @@ "*table.update([table.user], [table.create_uid])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.user], [table.create_uid]))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.user], [table.create_uid]))", "phase": "after_super", "condition": "not user_exists" }, @@ -159,7 +159,7 @@ "*table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model], [model.model],\n from_=[model],\n where=table._temp_model == model.id))", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -178,7 +178,7 @@ "from_": "[model]", "where": "table._temp_model == model.id" }, - "code": "table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id)", + "code": "table.update(\n [table.model], [model.model],\n from_=[model],\n where=table._temp_model == model.id)", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -248,7 +248,7 @@ "*table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model], [model.model],\n from_=[model],\n where=table._temp_model == model.id))", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -267,7 +267,7 @@ "from_": "[model]", "where": "table._temp_model == model.id" }, - "code": "table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id)", + "code": "table.update(\n [table.model], [model.model],\n from_=[model],\n where=table._temp_model == model.id)", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -353,7 +353,7 @@ "*table.update([table.model, table.field], [field.model, field.name], from_=[field], where=table._temp_field == field.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model, table.field], [field.model, field.name], from_=[field], where=table._temp_field == field.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model, table.field],\n [field.model, field.name],\n from_=[field],\n where=table._temp_field == field.id))", "phase": "before_super", "condition": "table_h.column_exist('field') and table_h.column_is_type('field', 'INTEGER')" }, @@ -372,7 +372,7 @@ "from_": "[field]", "where": "table._temp_field == field.id" }, - "code": "table.update([table.model, table.field], [field.model, field.name], from_=[field], where=table._temp_field == field.id)", + "code": "table.update(\n [table.model, table.field],\n [field.model, field.name],\n from_=[field],\n where=table._temp_field == field.id)", "phase": "before_super", "condition": "table_h.column_exist('field') and table_h.column_is_type('field', 'INTEGER')" }, @@ -442,7 +442,7 @@ "*table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model], [model.model],\n from_=[model],\n where=table._temp_model == model.id))", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -461,7 +461,7 @@ "from_": "[model]", "where": "table._temp_model == model.id" }, - "code": "table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id)", + "code": "table.update(\n [table.model], [model.model],\n from_=[model],\n where=table._temp_model == model.id)", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -592,7 +592,7 @@ "*table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model], [model.model],\n from_=[model],\n where=table._temp_model == model.id))", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -611,7 +611,7 @@ "from_": "[model]", "where": "table._temp_model == model.id" }, - "code": "table.update([table.model], [model.model], from_=[model], where=table._temp_model == model.id)", + "code": "table.update(\n [table.model], [model.model],\n from_=[model],\n where=table._temp_model == model.id)", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -674,7 +674,7 @@ "*table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code))" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.sequence_type],\n sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code)))", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -691,7 +691,7 @@ "sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)" ], "kwargs": {}, - "code": "table.update([table.sequence_type], sequence_type.select(sequence_type.id, where=sequence_type.code == table.code))", + "code": "table.update(\n [table.sequence_type],\n sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code))", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -708,7 +708,7 @@ "kwargs": { "where": "sequence_type.code == table.code" }, - "code": "sequence_type.select(sequence_type.id, where=sequence_type.code == table.code)", + "code": "sequence_type.select(\n sequence_type.id,\n where=sequence_type.code == table.code)", "phase": "after_super", "condition": "table_h.column_exist('code')" }, @@ -786,7 +786,7 @@ "kwargs": { "where": "model.id == sql_table.action_model" }, - "code": "model.select(model.model, where=model.id == sql_table.action_model)", + "code": "model.select(\n model.model, where=model.id == sql_table.(model.select(\n model.model, where=model.id == sql_table.action_model)))", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -801,7 +801,7 @@ "*sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))])" ], "kwargs": {}, - "code": "cursor.execute(*sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))]))", + "code": "(Transaction().connection.cursor()).execute(*sql_table.update(\n [sql_table.action],\n [Concat((model.select(\n model.model, where=model.id == sql_table.action_model)), Concat(\n '|', sql_table.action_function))]))", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -817,7 +817,7 @@ "[Concat(action_model, Concat('|', sql_table.action_function))]" ], "kwargs": {}, - "code": "sql_table.update([sql_table.action], [Concat(action_model, Concat('|', sql_table.action_function))])", + "code": "sql_table.update(\n [sql_table.action],\n [Concat((model.select(\n model.model, where=model.id == sql_table.action_model)), Concat(\n '|', sql_table.action_function))])", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -832,7 +832,7 @@ "'action_model'" ], "kwargs": {}, - "code": "table_h.drop_column('action_model')", + "code": "table_h.drop_column('(model.select(\n model.model, where=model.id == sql_table.action_model))')", "phase": "after_super", "condition": "table_h.column_exist('action_model') and table_h.column_exist('action_function')" }, @@ -909,7 +909,7 @@ "*table.update([table.model], [view.select(view.model, where=view.id == table.view)], where=table.model == Null)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [view.select(view.model, where=view.id == table.view)], where=table.model == Null))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.model],\n [view.select(view.model, where=view.id == table.view)],\n where=table.model == Null))", "phase": "after_super" }, { @@ -927,7 +927,7 @@ "kwargs": { "where": "table.model == Null" }, - "code": "table.update([table.model], [view.select(view.model, where=view.id == table.view)], where=table.model == Null)", + "code": "table.update(\n [table.model],\n [view.select(view.model, where=view.id == table.view)],\n where=table.model == Null)", "phase": "after_super" }, { diff --git a/data/7.4/party.json b/data/7.4/party.json index 4fccae4..6b040d6 100644 --- a/data/7.4/party.json +++ b/data/7.4/party.json @@ -44,7 +44,7 @@ "country.select(country.code, where=country.id == table.country)" ], "kwargs": {}, - "code": "table.update([table.country_code], country.select(country.code, where=country.id == table.country))", + "code": "table.update(\n [table.country_code],\n country.select(\n country.code,\n where=country.id == table.country))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -61,7 +61,7 @@ "kwargs": { "where": "country.id == table.country" }, - "code": "country.select(country.code, where=country.id == table.country)", + "code": "country.select(\n country.code,\n where=country.id == table.country)", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -74,7 +74,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('country')" }, @@ -106,7 +106,7 @@ "language.select(Substring(language.code, 0, 2), where=language.id == table.language)" ], "kwargs": {}, - "code": "table.update([table.language_code], language.select(Substring(language.code, 0, 2), where=language.id == table.language))", + "code": "table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -123,7 +123,7 @@ "kwargs": { "where": "language.id == table.language" }, - "code": "language.select(Substring(language.code, 0, 2), where=language.id == table.language)", + "code": "language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language)", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -136,7 +136,7 @@ "*query" ], "kwargs": {}, - "code": "cursor.execute(*query)", + "code": "(Transaction().connection.cursor()).execute(*(table.update(\n [table.language_code],\n language.select(\n Substring(language.code, 0, 2),\n where=language.id == table.language))))", "phase": "after_super", "condition": "table_h.column_exist('language')" }, @@ -174,7 +174,7 @@ "*table.update([table.identifier_types], [cls.identifier_types.sql_format(identifier_types)])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.identifier_types], [cls.identifier_types.sql_format(identifier_types)]))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.identifier_types],\n [cls.identifier_types.sql_format(identifier_types)]\n ))", "phase": "after_super", "condition": "configuration.identifier_types != identifier_types" }, @@ -190,7 +190,7 @@ "[cls.identifier_types.sql_format(identifier_types)]" ], "kwargs": {}, - "code": "table.update([table.identifier_types], [cls.identifier_types.sql_format(identifier_types)])", + "code": "table.update(\n [table.identifier_types],\n [cls.identifier_types.sql_format(identifier_types)]\n )", "phase": "after_super", "condition": "configuration.identifier_types != identifier_types" } @@ -237,7 +237,7 @@ "*table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit'))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.type], ['cn_ric'],\n where=(table.type == 'cn_rit')))", "phase": "after_super" }, { @@ -254,7 +254,7 @@ "kwargs": { "where": "table.type == 'cn_rit'" }, - "code": "table.update([table.type], ['cn_ric'], where=table.type == 'cn_rit')", + "code": "table.update([table.type], ['cn_ric'],\n where=(table.type == 'cn_rit'))", "phase": "after_super" }, { @@ -268,7 +268,7 @@ "*table.update([table.type], ['uy_rut'], where=table.type == 'uy_ruc')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.type], ['uy_rut'], where=table.type == 'uy_ruc'))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.type], ['uy_rut'],\n where=(table.type == 'uy_ruc')))", "phase": "after_super" }, { @@ -285,7 +285,7 @@ "kwargs": { "where": "table.type == 'uy_ruc'" }, - "code": "table.update([table.type], ['uy_rut'], where=table.type == 'uy_ruc')", + "code": "table.update([table.type], ['uy_rut'],\n where=(table.type == 'uy_ruc'))", "phase": "after_super" } ] diff --git a/data/7.4/product.json b/data/7.4/product.json index 63e29b5..41fd7d8 100644 --- a/data/7.4/product.json +++ b/data/7.4/product.json @@ -19,7 +19,7 @@ "*table.update([table.suffix_code], [table.code])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.suffix_code], [table.code]))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.suffix_code],\n [table.code]))", "phase": "after_super", "condition": "fill_suffix_code" }, @@ -35,7 +35,7 @@ "[table.code]" ], "kwargs": {}, - "code": "table.update([table.suffix_code], [table.code])", + "code": "table.update(\n [table.suffix_code],\n [table.code])", "phase": "after_super", "condition": "fill_suffix_code" } diff --git a/data/7.4/production.json b/data/7.4/production.json index 4a25879..237cb55 100644 --- a/data/7.4/production.json +++ b/data/7.4/production.json @@ -57,7 +57,7 @@ "*table.update([table.method], ['ir.cron|stock_shipment_assign_try'], where=table.method == 'production|assign_cron')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.method], ['ir.cron|stock_shipment_assign_try'], where=table.method == 'production|assign_cron'))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.method], ['ir.cron|stock_shipment_assign_try'],\n where=table.method == 'production|assign_cron'))", "phase": "after_super" }, { @@ -74,7 +74,7 @@ "kwargs": { "where": "table.method == 'production|assign_cron'" }, - "code": "table.update([table.method], ['ir.cron|stock_shipment_assign_try'], where=table.method == 'production|assign_cron')", + "code": "table.update(\n [table.method], ['ir.cron|stock_shipment_assign_try'],\n where=table.method == 'production|assign_cron')", "phase": "after_super" } ] @@ -112,7 +112,7 @@ "*table.update([table.state], ['cancelled'], where=table.state == 'cancel')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.state], ['cancelled'], where=table.state == 'cancel'))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.state], ['cancelled'],\n where=table.state == 'cancel'))", "phase": "after_super" }, { @@ -129,7 +129,7 @@ "kwargs": { "where": "table.state == 'cancel'" }, - "code": "table.update([table.state], ['cancelled'], where=table.state == 'cancel')", + "code": "table.update(\n [table.state], ['cancelled'],\n where=table.state == 'cancel')", "phase": "after_super" } ] diff --git a/data/7.4/res.json b/data/7.4/res.json index 0f47953..ef58960 100644 --- a/data/7.4/res.json +++ b/data/7.4/res.json @@ -19,7 +19,7 @@ "*model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin'))" ], "kwargs": {}, - "code": "cursor.execute(*model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin')))", + "code": "(Transaction().connection.cursor()).execute(*model_data.update(\n [model_data.noupdate], [True],\n where=(model_data.model == cls.__name__)\n & (model_data.module == 'res')\n & (model_data.fs_id == 'user_admin')))", "phase": "after_super" }, { @@ -36,7 +36,7 @@ "kwargs": { "where": "(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin')" }, - "code": "model_data.update([model_data.noupdate], [True], where=(model_data.model == cls.__name__) & (model_data.module == 'res') & (model_data.fs_id == 'user_admin'))", + "code": "model_data.update(\n [model_data.noupdate], [True],\n where=(model_data.model == cls.__name__)\n & (model_data.module == 'res')\n & (model_data.fs_id == 'user_admin'))", "phase": "after_super" } ] diff --git a/data/7.4/stock_lot.json b/data/7.4/stock_lot.json index 6a3d6db..a3b4ebb 100644 --- a/data/7.4/stock_lot.json +++ b/data/7.4/stock_lot.json @@ -17,7 +17,7 @@ "*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)" ], "kwargs": {}, - "code": "cursor_select.execute(*template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template))", + "code": "(connection.cursor()).execute(*template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template))", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" }, @@ -32,7 +32,7 @@ "kwargs": { "distinct_on": "template_lot_type.template" }, - "code": "template_lot_type.select(template_lot_type.template, distinct_on=template_lot_type.template)", + "code": "template_lot_type.select(\n template_lot_type.template,\n distinct_on=template_lot_type.template)", "phase": "after_super", "condition": "table_h.table_exist(template_lot_type_table_name) and table_h.table_exist(lot_type_table_name)" } diff --git a/data/7.6/ir.json b/data/7.6/ir.json index db2f4b0..0dc4330 100644 --- a/data/7.6/ir.json +++ b/data/7.6/ir.json @@ -19,7 +19,7 @@ "*table.update([table.user], [table.create_uid])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.user], [table.create_uid]))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.user], [table.create_uid]))", "phase": "after_super", "condition": "not user_exists" }, @@ -144,7 +144,7 @@ "*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id))", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -163,7 +163,7 @@ "from_": "[model]", "where": "table._temp_model == model.id" }, - "code": "table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)", + "code": "table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id)", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -248,7 +248,7 @@ "*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id))", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -267,7 +267,7 @@ "from_": "[model]", "where": "table._temp_model == model.id" }, - "code": "table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)", + "code": "table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id)", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -353,7 +353,7 @@ "*table.update([table.model, table.field], [field.model, field.name], from_=[field], where=table._temp_field == field.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model, table.field], [field.model, field.name], from_=[field], where=table._temp_field == field.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model, table.field],\n [field.model, field.name],\n from_=[field],\n where=table._temp_field == field.id))", "phase": "before_super", "condition": "table_h.column_exist('field') and table_h.column_is_type('field', 'INTEGER')" }, @@ -372,7 +372,7 @@ "from_": "[field]", "where": "table._temp_field == field.id" }, - "code": "table.update([table.model, table.field], [field.model, field.name], from_=[field], where=table._temp_field == field.id)", + "code": "table.update(\n [table.model, table.field],\n [field.model, field.name],\n from_=[field],\n where=table._temp_field == field.id)", "phase": "before_super", "condition": "table_h.column_exist('field') and table_h.column_is_type('field', 'INTEGER')" }, @@ -442,7 +442,7 @@ "*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id))", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -461,7 +461,7 @@ "from_": "[model]", "where": "table._temp_model == model.id" }, - "code": "table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)", + "code": "table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id)", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -567,7 +567,7 @@ "*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id))", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -586,7 +586,7 @@ "from_": "[model]", "where": "table._temp_model == model.id" }, - "code": "table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)", + "code": "table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id)", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -640,7 +640,7 @@ "*table.update([table.model], [view.select(view.model, where=view.id == table.view)], where=table.model == Null)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [view.select(view.model, where=view.id == table.view)], where=table.model == Null))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.model],\n [view.select(view.model, where=view.id == table.view)],\n where=table.model == Null))", "phase": "after_super" }, { @@ -658,7 +658,7 @@ "kwargs": { "where": "table.model == Null" }, - "code": "table.update([table.model], [view.select(view.model, where=view.id == table.view)], where=table.model == Null)", + "code": "table.update(\n [table.model],\n [view.select(view.model, where=view.id == table.view)],\n where=table.model == Null)", "phase": "after_super" }, { diff --git a/data/7.6/party.json b/data/7.6/party.json index fa5dc9b..505bea1 100644 --- a/data/7.6/party.json +++ b/data/7.6/party.json @@ -57,7 +57,7 @@ "*table.update([table.identifier_types], [cls.identifier_types.sql_format(identifier_types)])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.identifier_types], [cls.identifier_types.sql_format(identifier_types)]))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.identifier_types],\n [cls.identifier_types.sql_format(identifier_types)]\n ))", "phase": "after_super", "condition": "configuration.identifier_types != identifier_types" }, @@ -73,7 +73,7 @@ "[cls.identifier_types.sql_format(identifier_types)]" ], "kwargs": {}, - "code": "table.update([table.identifier_types], [cls.identifier_types.sql_format(identifier_types)])", + "code": "table.update(\n [table.identifier_types],\n [cls.identifier_types.sql_format(identifier_types)]\n )", "phase": "after_super", "condition": "configuration.identifier_types != identifier_types" } @@ -120,7 +120,7 @@ "*table.update([table.type], ['uy_rut'], where=table.type == 'uy_ruc')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.type], ['uy_rut'], where=table.type == 'uy_ruc'))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.type], ['uy_rut'],\n where=(table.type == 'uy_ruc')))", "phase": "after_super" }, { @@ -137,7 +137,7 @@ "kwargs": { "where": "table.type == 'uy_ruc'" }, - "code": "table.update([table.type], ['uy_rut'], where=table.type == 'uy_ruc')", + "code": "table.update([table.type], ['uy_rut'],\n where=(table.type == 'uy_ruc'))", "phase": "after_super" }, { @@ -151,7 +151,7 @@ "*table.update([table.type], ['co_nit'], where=table.type == 'co_rut')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.type], ['co_nit'], where=table.type == 'co_rut'))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.type], ['co_nit'],\n where=(table.type == 'co_rut')))", "phase": "after_super" }, { @@ -168,7 +168,7 @@ "kwargs": { "where": "table.type == 'co_rut'" }, - "code": "table.update([table.type], ['co_nit'], where=table.type == 'co_rut')", + "code": "table.update([table.type], ['co_nit'],\n where=(table.type == 'co_rut'))", "phase": "after_super" } ] diff --git a/data/7.6/production.json b/data/7.6/production.json index e7ce461..61ed7ca 100644 --- a/data/7.6/production.json +++ b/data/7.6/production.json @@ -57,7 +57,7 @@ "*table.update([table.method], ['ir.cron|stock_shipment_assign_try'], where=table.method == 'production|assign_cron')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.method], ['ir.cron|stock_shipment_assign_try'], where=table.method == 'production|assign_cron'))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.method], ['ir.cron|stock_shipment_assign_try'],\n where=table.method == 'production|assign_cron'))", "phase": "after_super" }, { @@ -74,7 +74,7 @@ "kwargs": { "where": "table.method == 'production|assign_cron'" }, - "code": "table.update([table.method], ['ir.cron|stock_shipment_assign_try'], where=table.method == 'production|assign_cron')", + "code": "table.update(\n [table.method], ['ir.cron|stock_shipment_assign_try'],\n where=table.method == 'production|assign_cron')", "phase": "after_super" } ] diff --git a/data/7.8/ir.json b/data/7.8/ir.json index 38fc9d1..a19a3e9 100644 --- a/data/7.8/ir.json +++ b/data/7.8/ir.json @@ -19,7 +19,7 @@ "*table.update([table.user], [table.create_uid])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.user], [table.create_uid]))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.user], [table.create_uid]))", "phase": "after_super", "condition": "not user_exists" }, @@ -144,7 +144,7 @@ "*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id))", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -163,7 +163,7 @@ "from_": "[model]", "where": "table._temp_model == model.id" }, - "code": "table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)", + "code": "table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id)", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -248,7 +248,7 @@ "*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id))", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -267,7 +267,7 @@ "from_": "[model]", "where": "table._temp_model == model.id" }, - "code": "table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)", + "code": "table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id)", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -353,7 +353,7 @@ "*table.update([table.model, table.field], [field.model, field.name], from_=[field], where=table._temp_field == field.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model, table.field], [field.model, field.name], from_=[field], where=table._temp_field == field.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model, table.field],\n [field.model, field.name],\n from_=[field],\n where=table._temp_field == field.id))", "phase": "before_super", "condition": "table_h.column_exist('field') and table_h.column_is_type('field', 'INTEGER')" }, @@ -372,7 +372,7 @@ "from_": "[field]", "where": "table._temp_field == field.id" }, - "code": "table.update([table.model, table.field], [field.model, field.name], from_=[field], where=table._temp_field == field.id)", + "code": "table.update(\n [table.model, table.field],\n [field.model, field.name],\n from_=[field],\n where=table._temp_field == field.id)", "phase": "before_super", "condition": "table_h.column_exist('field') and table_h.column_is_type('field', 'INTEGER')" }, @@ -442,7 +442,7 @@ "*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id))", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -461,7 +461,7 @@ "from_": "[model]", "where": "table._temp_model == model.id" }, - "code": "table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)", + "code": "table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id)", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -567,7 +567,7 @@ "*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id))", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -586,7 +586,7 @@ "from_": "[model]", "where": "table._temp_model == model.id" }, - "code": "table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)", + "code": "table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id)", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -640,7 +640,7 @@ "*table.update([table.model], [view.select(view.model, where=view.id == table.view)], where=table.model == Null)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [view.select(view.model, where=view.id == table.view)], where=table.model == Null))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.model],\n [view.select(view.model, where=view.id == table.view)],\n where=table.model == Null))", "phase": "after_super" }, { @@ -658,7 +658,7 @@ "kwargs": { "where": "table.model == Null" }, - "code": "table.update([table.model], [view.select(view.model, where=view.id == table.view)], where=table.model == Null)", + "code": "table.update(\n [table.model],\n [view.select(view.model, where=view.id == table.view)],\n where=table.model == Null)", "phase": "after_super" }, { diff --git a/data/7.8/party.json b/data/7.8/party.json index 6e434d2..df049f4 100644 --- a/data/7.8/party.json +++ b/data/7.8/party.json @@ -57,7 +57,7 @@ "*table.update([table.identifier_types], [cls.identifier_types.sql_format(identifier_types)])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.identifier_types], [cls.identifier_types.sql_format(identifier_types)]))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.identifier_types],\n [cls.identifier_types.sql_format(identifier_types)]\n ))", "phase": "after_super", "condition": "configuration.identifier_types != identifier_types" }, @@ -73,7 +73,7 @@ "[cls.identifier_types.sql_format(identifier_types)]" ], "kwargs": {}, - "code": "table.update([table.identifier_types], [cls.identifier_types.sql_format(identifier_types)])", + "code": "table.update(\n [table.identifier_types],\n [cls.identifier_types.sql_format(identifier_types)]\n )", "phase": "after_super", "condition": "configuration.identifier_types != identifier_types" } @@ -120,7 +120,7 @@ "*table.update([table.type], ['uy_rut'], where=table.type == 'uy_ruc')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.type], ['uy_rut'], where=table.type == 'uy_ruc'))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.type], ['uy_rut'],\n where=(table.type == 'uy_ruc')))", "phase": "after_super" }, { @@ -137,7 +137,7 @@ "kwargs": { "where": "table.type == 'uy_ruc'" }, - "code": "table.update([table.type], ['uy_rut'], where=table.type == 'uy_ruc')", + "code": "table.update([table.type], ['uy_rut'],\n where=(table.type == 'uy_ruc'))", "phase": "after_super" }, { @@ -151,7 +151,7 @@ "*table.update([table.type], ['co_nit'], where=table.type == 'co_rut')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.type], ['co_nit'], where=table.type == 'co_rut'))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.type], ['co_nit'],\n where=(table.type == 'co_rut')))", "phase": "after_super" }, { @@ -168,7 +168,7 @@ "kwargs": { "where": "table.type == 'co_rut'" }, - "code": "table.update([table.type], ['co_nit'], where=table.type == 'co_rut')", + "code": "table.update([table.type], ['co_nit'],\n where=(table.type == 'co_rut'))", "phase": "after_super" } ] diff --git a/data/7.8/production.json b/data/7.8/production.json index 0fbfe7a..f6f6cca 100644 --- a/data/7.8/production.json +++ b/data/7.8/production.json @@ -72,7 +72,7 @@ "*table.update([table.method], ['ir.cron|stock_shipment_assign_try'], where=table.method == 'production|assign_cron')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.method], ['ir.cron|stock_shipment_assign_try'], where=table.method == 'production|assign_cron'))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.method], ['ir.cron|stock_shipment_assign_try'],\n where=table.method == 'production|assign_cron'))", "phase": "after_super" }, { @@ -89,7 +89,7 @@ "kwargs": { "where": "table.method == 'production|assign_cron'" }, - "code": "table.update([table.method], ['ir.cron|stock_shipment_assign_try'], where=table.method == 'production|assign_cron')", + "code": "table.update(\n [table.method], ['ir.cron|stock_shipment_assign_try'],\n where=table.method == 'production|assign_cron')", "phase": "after_super" } ] diff --git a/data/8.0/ir.json b/data/8.0/ir.json index 52dc7bf..d076d8c 100644 --- a/data/8.0/ir.json +++ b/data/8.0/ir.json @@ -19,7 +19,7 @@ "*table.update([table.user], [table.create_uid])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.user], [table.create_uid]))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.user], [table.create_uid]))", "phase": "after_super", "condition": "not user_exists" }, @@ -144,7 +144,7 @@ "*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id))", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -163,7 +163,7 @@ "from_": "[model]", "where": "table._temp_model == model.id" }, - "code": "table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)", + "code": "table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id)", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -248,7 +248,7 @@ "*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id))", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -267,7 +267,7 @@ "from_": "[model]", "where": "table._temp_model == model.id" }, - "code": "table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)", + "code": "table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id)", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -353,7 +353,7 @@ "*table.update([table.model, table.field], [field.model, field.name], from_=[field], where=table._temp_field == field.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model, table.field], [field.model, field.name], from_=[field], where=table._temp_field == field.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model, table.field],\n [field.model, field.name],\n from_=[field],\n where=table._temp_field == field.id))", "phase": "before_super", "condition": "table_h.column_exist('field') and table_h.column_is_type('field', 'INTEGER')" }, @@ -372,7 +372,7 @@ "from_": "[field]", "where": "table._temp_field == field.id" }, - "code": "table.update([table.model, table.field], [field.model, field.name], from_=[field], where=table._temp_field == field.id)", + "code": "table.update(\n [table.model, table.field],\n [field.model, field.name],\n from_=[field],\n where=table._temp_field == field.id)", "phase": "before_super", "condition": "table_h.column_exist('field') and table_h.column_is_type('field', 'INTEGER')" }, @@ -442,7 +442,7 @@ "*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id))", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -461,7 +461,7 @@ "from_": "[model]", "where": "table._temp_model == model.id" }, - "code": "table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)", + "code": "table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id)", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -567,7 +567,7 @@ "*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id))", + "code": "(transaction.connection.cursor()).execute(*table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id))", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -586,7 +586,7 @@ "from_": "[model]", "where": "table._temp_model == model.id" }, - "code": "table.update([table.model], [model.name], from_=[model], where=table._temp_model == model.id)", + "code": "table.update(\n [table.model], [model.name],\n from_=[model],\n where=table._temp_model == model.id)", "phase": "before_super", "condition": "table_h.column_exist('model') and table_h.column_is_type('model', 'INTEGER')" }, @@ -663,7 +663,7 @@ "*table.update([table.model], [view.select(view.model, where=view.id == table.view)], where=table.model == Null)" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.model], [view.select(view.model, where=view.id == table.view)], where=table.model == Null))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.model],\n [view.select(view.model, where=view.id == table.view)],\n where=table.model == Null))", "phase": "after_super" }, { @@ -681,7 +681,7 @@ "kwargs": { "where": "table.model == Null" }, - "code": "table.update([table.model], [view.select(view.model, where=view.id == table.view)], where=table.model == Null)", + "code": "table.update(\n [table.model],\n [view.select(view.model, where=view.id == table.view)],\n where=table.model == Null)", "phase": "after_super" }, { diff --git a/data/8.0/party.json b/data/8.0/party.json index bf46773..889c316 100644 --- a/data/8.0/party.json +++ b/data/8.0/party.json @@ -57,7 +57,7 @@ "*table.update([table.identifier_types], [cls.identifier_types.sql_format(identifier_types)])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.identifier_types], [cls.identifier_types.sql_format(identifier_types)]))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.identifier_types],\n [cls.identifier_types.sql_format(identifier_types)]\n ))", "phase": "after_super", "condition": "configuration.identifier_types != identifier_types" }, @@ -73,7 +73,7 @@ "[cls.identifier_types.sql_format(identifier_types)]" ], "kwargs": {}, - "code": "table.update([table.identifier_types], [cls.identifier_types.sql_format(identifier_types)])", + "code": "table.update(\n [table.identifier_types],\n [cls.identifier_types.sql_format(identifier_types)]\n )", "phase": "after_super", "condition": "configuration.identifier_types != identifier_types" } @@ -120,7 +120,7 @@ "*table.update([table.type], ['uy_rut'], where=table.type == 'uy_ruc')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.type], ['uy_rut'], where=table.type == 'uy_ruc'))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.type], ['uy_rut'],\n where=(table.type == 'uy_ruc')))", "phase": "after_super" }, { @@ -137,7 +137,7 @@ "kwargs": { "where": "table.type == 'uy_ruc'" }, - "code": "table.update([table.type], ['uy_rut'], where=table.type == 'uy_ruc')", + "code": "table.update([table.type], ['uy_rut'],\n where=(table.type == 'uy_ruc'))", "phase": "after_super" }, { @@ -151,7 +151,7 @@ "*table.update([table.type], ['co_nit'], where=table.type == 'co_rut')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.type], ['co_nit'], where=table.type == 'co_rut'))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.type], ['co_nit'],\n where=(table.type == 'co_rut')))", "phase": "after_super" }, { @@ -168,7 +168,7 @@ "kwargs": { "where": "table.type == 'co_rut'" }, - "code": "table.update([table.type], ['co_nit'], where=table.type == 'co_rut')", + "code": "table.update([table.type], ['co_nit'],\n where=(table.type == 'co_rut'))", "phase": "after_super" }, { @@ -182,7 +182,7 @@ "*table.update([table.code_compact], [table.code])" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.code_compact], [table.code]))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.code_compact], [table.code]))", "phase": "after_super", "condition": "fill_code_compact" }, @@ -213,7 +213,7 @@ "*table.update([table.type], ['si_maticna'], where=table.type == 'si_businessid')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.type], ['si_maticna'], where=table.type == 'si_businessid'))", + "code": "(Transaction().connection.cursor()).execute(*table.update([table.type], ['si_maticna'],\n where=(table.type == 'si_businessid')))", "phase": "after_super" }, { @@ -230,7 +230,7 @@ "kwargs": { "where": "table.type == 'si_businessid'" }, - "code": "table.update([table.type], ['si_maticna'], where=table.type == 'si_businessid')", + "code": "table.update([table.type], ['si_maticna'],\n where=(table.type == 'si_businessid'))", "phase": "after_super" } ] diff --git a/data/8.0/production.json b/data/8.0/production.json index be7bee3..aff2811 100644 --- a/data/8.0/production.json +++ b/data/8.0/production.json @@ -72,7 +72,7 @@ "*table.update([table.method], ['ir.cron|stock_shipment_assign_try'], where=table.method == 'production|assign_cron')" ], "kwargs": {}, - "code": "cursor.execute(*table.update([table.method], ['ir.cron|stock_shipment_assign_try'], where=table.method == 'production|assign_cron'))", + "code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.method], ['ir.cron|stock_shipment_assign_try'],\n where=table.method == 'production|assign_cron'))", "phase": "after_super" }, { @@ -89,7 +89,7 @@ "kwargs": { "where": "table.method == 'production|assign_cron'" }, - "code": "table.update([table.method], ['ir.cron|stock_shipment_assign_try'], where=table.method == 'production|assign_cron')", + "code": "table.update(\n [table.method], ['ir.cron|stock_shipment_assign_try'],\n where=table.method == 'production|assign_cron')", "phase": "after_super" } ] diff --git a/extract.py b/extract.py index 965da7c..cf891c3 100644 --- a/extract.py +++ b/extract.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 +import re import ast import argparse import json @@ -28,10 +29,13 @@ DEFAULT_OUTPUT = "data" class RegisterExtractor(ast.NodeVisitor): - def __init__(self, filename): + def __init__(self, filename, source): self.filename = filename + self.source = source self.results = [] self.model_names = {} + self.table_vars = {} + self.alias_vars = {} def visit_Module(self, node): for item in node.body: @@ -103,8 +107,22 @@ class RegisterExtractor(ast.NodeVisitor): continue table = self.resolve_table_call(node.value) + if table: self.table_vars[target.id] = table + elif ( + isinstance(node.value, ast.Call) + and isinstance(node.value.func, ast.Attribute) + ): + table = self.resolve_table_object(node.value.func.value) + if table: + self.table_vars[target.id] = table + + # Ausdruck für spätere Auflösung merken + self.alias_vars[target.id] = ast.get_source_segment( + self.source, node.value + ) + elif isinstance(node.value, ast.Constant): self.table_vars[target.id] = node.value.value @@ -256,9 +274,6 @@ class RegisterExtractor(ast.NodeVisitor): if condition: op["condition"] = condition operations.append(op) - - if not op['tables']: - print(op) for child in ast.iter_child_nodes(node): self.walk_expression(child, operations, phase, condition) @@ -374,7 +389,14 @@ class RegisterExtractor(ast.NodeVisitor): kwargs[kw.arg] = ast.unparse(kw.value) except Exception: kwargs[kw.arg] = "" - + code = ast.get_source_segment(self.source, call) + + for name, value in self.alias_vars.items(): + code = re.sub( + rf"\b{re.escape(name)}\b", + f"({value})", + code, + ) return { "object": obj, "operation": operation, @@ -382,18 +404,19 @@ class RegisterExtractor(ast.NodeVisitor): "line": call.lineno, "args": args, "kwargs": kwargs, - "code": ast.unparse(call), + "code": code, } def analyse_file(path): try: - tree = ast.parse(path.read_text(encoding="utf-8")) + source = path.read_text(encoding="utf-8") + tree = ast.parse(source) except Exception as e: print(f"Cannot parse {path}: {e}") return [] - visitor = RegisterExtractor(str(path)) + visitor = RegisterExtractor(str(path), source) visitor.visit(tree) results = [r for r in visitor.results if r["operations"]]