-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement replace on the Database Column (#7275)
Implements `replace` for database text columns, for text, regex, and column patterns.
- Loading branch information
1 parent
2dc565b
commit 1f6fcf1
Showing
13 changed files
with
356 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
distribution/lib/Standard/Database/0.0.0-dev/src/Internal/Replace_Params.enso
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Standard.Base.Data.Boolean.Boolean | ||
import Standard.Base.Error.Error | ||
import Standard.Base.Nothing.Nothing | ||
import Standard.Base.Data.Text.Case_Sensitivity.Case_Sensitivity | ||
|
||
from project.Errors import Unsupported_Database_Operation | ||
|
||
# Specifies a set of parameters to Table.replace | ||
type Replace_Params | ||
Value input_type (case_sensitivity : Case_Sensitivity) (only_first : Boolean) | ||
|
||
## Raise an exception for an unsupported combination of parameters | ||
throw_unsupported : Nothing ! Unsupported_Database_Operation | ||
throw_unsupported self = | ||
msg = "The REPLACE operation is not supported on PostgreSQL for the following options: argument type " + self.input_type.to_text + ", case_sensitivity " + self.case_sensitivity.to_display_text + ", only_first " + self.only_first.to_text | ||
Error.throw (Unsupported_Database_Operation.Error msg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.