Replies: 3 comments
-
No, not yet. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks Tamás,
My code uses custom type ContractStatus:
type ContractStatus int
The driver cannot convert custom type *ContractStatus* to integer , so I
have to do it implicitly, for example instead of
err := dao.ExecContext(
sqlUpdateContractStatusAndMessage, status, nullErrMsg, key.ID, key.Version)
I need to use :
err := dao.ExecContext(
sqlUpdateContractStatusAndMessage, int(status), nullErrMsg,
key.ID, key.Version)
Is there any better way to handle custom type ContractStatus to allow the
driver to handle the status variable as an integer in this call ?
…On Mon, Mar 11, 2024 at 10:47 PM Tamás Gulácsi ***@***.***> wrote:
No, not yet.
We could look into the type to see the "underlying type", but it's hard to
not gain complexity in the driver.
I'm open for suggestions!
—
Reply to this email directly, view it on GitHub
<#325 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEW3G6M2D7H5MDSYICYAHD3YX2JFNAVCNFSM6AAAAABERJILXGVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DONJUHE3TO>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
PTAL 89780a1 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I use in golang type: type ResourceType int
and I need to bind int to the column NUMBER(4.0)
I got error:
Handling uncaught error: type=*data.DBException, error=error executing query: 2. arg bindVarTypeSwitch(model.ResourceType): unknown type
My code uses custom type ResourceType:
type ResourceType int
The driver cannot covert custom type ResourceType to integer , so I have to do it implicitly, for example instead of
dao.executeListQuery(sqlSelectTaskByEntityKey, resourceType)
I need to use :
dao.executeListQuery(sqlSelectTaskByEntityKey, int(resourceType))
Is any better way to handle custom type ResourceType to allow driver to handle the resourceType variable as a integer in this call ?
Beta Was this translation helpful? Give feedback.
All reactions