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
Expand functionality of null indicator in API [CORE5483] #5753
Comments
Commented by: @asfernandes > 2) A value with meaning "do not change value of field" which is effectively the same as (1) for inserts and for updates would leave current value as is instead of resetting it to default or provided value. What a hack. Completely disagree with this request. |
Commented by: @aafemt Can you suggest a better solution which would allow to modify only those fields that were changed by user but still be able to use prepared statements? |
Commented by: Sean Leyne (seanleyne) Dimitry, I think the responsibility would be yours, to show that Firebird is not supporting functionality that other engine provide. I am not aware of any other engine that would allow for a DSQL UPDATE statement to include a column with some form of "leave current value untouched" context -- this is what you are effectively proposing. |
Commented by: @asfernandes > Can you suggest a better solution which would allow to modify only those fields that were changed by user but still be able to use prepared statements? Firebird support list, please. |
Commented by: @aafemt > I am not aware of any other engine that would allow for a DSQL UPDATE statement to include a column with some form of "leave current value untouched" context Neither do I. But I still think that it could be a handy feature. |
Commented by: Sean Leyne (seanleyne) I believe Adriano is correct, this definitely smells like a "hack". Please bring this forward in the support list. |
Commented by: @aafemt Ok, I'm waiting for answers in support list. |
Commented by: @aafemt Getting back to this ticket: DB2 docs: https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/rzajp/rzajpnullvar.htm "For extended indicators, the indicator values are interpreted as follows:
ODBC specs: https://docs.microsoft.com/en-us/sql/odbc/reference/develop-app/using-length-and-indicator-values "SQL_DEFAULT_PARAM. A procedure is to use the default value of an input parameter in a procedure instead of the value in the corresponding data buffer. SQL_COLUMN_IGNORE. SQLBulkOperations or SQLSetPos is to ignore the value in the data buffer. When updating a row of data by a call to SQLBulkOperations or SQLSetPos, the column value is not changed. When inserting a new row of data by a call to SQLBulkOperations, the column value is set to its default or, if the column does not have a default, to NULL." |
Submitted by: @aafemt
Currently in input SQLDA/messsage null indicator can have two meaningful values: 0 for not null data and -1 for null indication.
It would be useful to add more:
1) A value indicating "set field to default", which is API support for CORE5449.
2) A value with meaning "do not change value of field" which is effectively the same as (1) for inserts and for updates would leave current value as is instead of resetting it to default or provided value.
The text was updated successfully, but these errors were encountered: