Progress 4GL logical field support #1209
Open
Conversation
|
Hi, thanks for the Pull Request! Can you check if we need to return strings for this transformation? and if we must return strings, can we return "t" and "f" instead of digits? |
|
Are you willing to update the PR for me to merge it? |
| @@ -500,6 +503,9 @@ | |||
| "Convert a DB3 logical value to a PostgreSQL boolean." | |||
| (if (member value '("?" " ") :test #'string=) nil value)) | |||
|
|
|||
| (defun progress-logical-to-boolean (value) | |||
| (if (string= value "yes") "1" (if (string= value "no") "0" nil)) | |||
| ) | |||
dimitri
Oct 19, 2020
Owner
Please close all the parens on the same line. In Lisp closing parens have no semantics attached to them.
Please close all the parens on the same line. In Lisp closing parens have no semantics attached to them.
| @@ -500,6 +503,9 @@ | |||
| "Convert a DB3 logical value to a PostgreSQL boolean." | |||
| (if (member value '("?" " ") :test #'string=) nil value)) | |||
|
|
|||
| (defun progress-logical-to-boolean (value) | |||
| (if (string= value "yes") "1" (if (string= value "no") "0" nil)) | |||
dimitri
Oct 19, 2020
Owner
A more lispy way to write the same thing, easier to maintain and read, is the following:
(cond ((string-equal value "yes") "1")
((string-equal value "no") "0")
(t nil))
A more lispy way to write the same thing, easier to maintain and read, is the following:
(cond ((string-equal value "yes") "1")
((string-equal value "no") "0")
(t nil))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.


When creating a dump from OpenEdge (Progress) database, boolean fields will contain the following values: