Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with CLOB type input parameters. #490

Closed
fitlcarlos opened this issue Dec 26, 2023 · 4 comments
Closed

Problem with CLOB type input parameters. #490

fitlcarlos opened this issue Dec 26, 2023 · 4 comments

Comments

@fitlcarlos
Copy link
Contributor

fitlcarlos commented Dec 26, 2023

As of version v2.7.23, insertion into CLOB fields is no longer working, I had to go back to version v2.7.22 to make the insertions, it does the normal insertion but it does not insert the content, the field remains empty in the table .

Example:

_, err = db.Exec("INSERT INTO table_test(file) values (:1)", go_ora.Clob{String: "XXXXXXXXXXXXX"})

@sijms
Copy link
Owner

sijms commented Dec 27, 2023

I am working on testing all previous issues and fixing all regressions

@sijms
Copy link
Owner

sijms commented Dec 29, 2023

you should pass Valid: true to identify that value is not null

_, err = db.Exec("INSERT INTO table_test(file) values (:1)", go_ora.Clob{String: "XXXXXXXXXXXXX", Valid: true})

@fitlcarlos
Copy link
Contributor Author

fitlcarlos commented Dec 29, 2023

you should pass Valid: true to identify that value is not null

_, err = db.Exec("INSERT INTO table_test(file) values (:1)", go_ora.Clob{String: "XXXXXXXXXXXXX", Valid: true})

I need to validate whether the variable is null or not to be able to report True or False.

Is there no way for the method receiving this value to perform this validation within the lib?

This way it is transparent for whoever is implementing it.

@sijms
Copy link
Owner

sijms commented Dec 29, 2023

when using Clob as input or output parameter
you can test .Valid field if false means value is null. if true value is not null

@sijms sijms closed this as completed Dec 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants