Skip to content

Commit

Permalink
Update dry run warning messages
Browse files Browse the repository at this point in the history
  • Loading branch information
AdRiley committed Feb 26, 2024
1 parent 288a00a commit 540d997
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ type File
temp.delete_if_exists

## Attach a warning to the file that it is a dry run
warning = Dry_Run_Operation.Warning "Only a dry run has occurred, with data written to a temporary file."
warning = Dry_Run_Operation.Warning "Only a dry run has occurred, with data written to a temporary file. Press the Record Once button ❙⬤❙ to write the actual file."
Warning.attach warning temp

## ALIAS current directory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ create_table_implementation connection table_name structure primary_key temporar
internal_create_table_structure connection effective_table_name structure primary_key effective_temporary on_problems
if dry_run.not then connection.query (SQL_Query.Table_Name created_table_name) else
created_table = connection.base_connection.internal_allocate_dry_run_table created_table_name
warning = Dry_Run_Operation.Warning "Only a dry run of `create_table` has occurred, creating a temporary table ("+created_table_name.pretty+") instead of the actual one."
warning = Dry_Run_Operation.Warning "Only a dry run of `create_table` has occurred, creating a temporary table ("+created_table_name.pretty+"). Press the Record Once button ❙⬤❙ to create the actual one."
Warning.attach warning created_table

## PRIVATE
Expand Down Expand Up @@ -119,7 +119,7 @@ select_into_table_implementation source_table connection table_name primary_key
connection.drop_table tmp_table_name if_exists=True
internal_upload_table source_table connection tmp_table_name primary_key temporary=True on_problems=on_problems row_limit=dry_run_row_limit
temporary_table = connection.base_connection.internal_allocate_dry_run_table table.name
warning = Dry_Run_Operation.Warning "Only a dry run of `select_into_database_table` was performed - a temporary table ("+tmp_table_name+") was created, containing a sample of the data."
warning = Dry_Run_Operation.Warning "Only a dry run of `select_into_database_table` was performed - a temporary table ("+tmp_table_name+") was created, containing a sample of the data. Press the Record Once button ❙⬤❙ to write to the actual table."
Warning.attach warning temporary_table

## PRIVATE
Expand Down Expand Up @@ -345,7 +345,7 @@ common_update_table (source_table : DB_Table | Table) (target_table : DB_Table)
above fails, the whole transaction will be rolled back.
connection.drop_table tmp_table.name
if dry_run.not then resulting_table else
warning = Dry_Run_Operation.Warning "Only a dry run of `update_rows` was performed - the target table has been returned unchanged."
warning = Dry_Run_Operation.Warning "Only a dry run of `update_rows` was performed - the target table has been returned unchanged. Press the Record Once button ❙⬤❙ to update the actual table."
Warning.attach warning resulting_table

## PRIVATE
Expand Down Expand Up @@ -550,7 +550,7 @@ common_delete_rows target_table key_values_to_delete key_columns allow_duplicate
source.drop_temporary_table connection
if dry_run.not then affected_row_count else
suffix = source.dry_run_message_suffix
warning = Dry_Run_Operation.Warning "Only a dry run of `delete_rows` was performed - the target table has not been changed."+suffix
warning = Dry_Run_Operation.Warning "Only a dry run of `delete_rows` was performed - the target table has not been changed. Press the Record Once button ❙⬤❙ to update the actual table."+suffix
Warning.attach warning affected_row_count

## PRIVATE
Expand Down

0 comments on commit 540d997

Please sign in to comment.