@@ -135,7 +135,7 @@ func (d *databaseImpl) GetOption(key string) (string, error) {
135135 case OptionAuthOktaUrl :
136136 return d .cfg .OktaURL .String (), nil
137137 case OptionKeepSessionAlive :
138- if d .cfg .KeepSessionAlive {
138+ if v , ok := d .cfg .Params [ "client_session_keep_alive" ]; ok && v != nil && strings . ToLower ( * v ) == adbc . OptionValueEnabled {
139139 return adbc .OptionValueEnabled , nil
140140 }
141141 return adbc .OptionValueDisabled , nil
@@ -362,12 +362,14 @@ func (d *databaseImpl) SetOptionInternal(k string, v string, cnOptions *map[stri
362362 case OptionKeepSessionAlive :
363363 switch v {
364364 case adbc .OptionValueEnabled :
365- d .cfg .KeepSessionAlive = true
365+ trueValue := adbc .OptionValueEnabled
366+ d .cfg .Params ["client_session_keep_alive" ] = & trueValue
366367 case adbc .OptionValueDisabled :
367- d .cfg .KeepSessionAlive = false
368+ falseValue := adbc .OptionValueDisabled
369+ d .cfg .Params ["client_session_keep_alive" ] = & falseValue
368370 default :
369371 return adbc.Error {
370- Msg : fmt .Sprintf ("Invalid value for database option '%s': '%s'" , OptionSSLSkipVerify , v ),
372+ Msg : fmt .Sprintf ("Invalid value for database option '%s': '%s'" , OptionKeepSessionAlive , v ),
371373 Code : adbc .StatusInvalidArgument ,
372374 }
373375 }
0 commit comments