mirror of
https://github.com/documize/community.git
synced 2025-07-20 13:49:42 +02:00
Database and LDAP upgrades
Bumped underlying dependencies affecting database and LDAP connectivity. Bumped to Go v1.14.3 and released v3.8.0.
This commit is contained in:
parent
aaa8c3282d
commit
4fe022aa0c
310 changed files with 36835 additions and 16448 deletions
30
vendor/github.com/denisenkom/go-mssqldb/mssql.go
generated
vendored
30
vendor/github.com/denisenkom/go-mssqldb/mssql.go
generated
vendored
|
@ -397,7 +397,10 @@ func (s *Stmt) Close() error {
|
|||
}
|
||||
|
||||
func (s *Stmt) SetQueryNotification(id, options string, timeout time.Duration) {
|
||||
to := uint32(timeout / time.Second)
|
||||
// 2.2.5.3.1 Query Notifications Header
|
||||
// https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-tds/e168d373-a7b7-41aa-b6ca-25985466a7e0
|
||||
// Timeout in milliseconds in TDS protocol.
|
||||
to := uint32(timeout / time.Millisecond)
|
||||
if to < 1 {
|
||||
to = 1
|
||||
}
|
||||
|
@ -613,11 +616,13 @@ loop:
|
|||
break loop
|
||||
case doneStruct:
|
||||
if token.isError() {
|
||||
cancel()
|
||||
return nil, s.c.checkBadConn(token.getError())
|
||||
}
|
||||
case ReturnStatus:
|
||||
s.c.setReturnStatus(token)
|
||||
case error:
|
||||
cancel()
|
||||
return nil, s.c.checkBadConn(token)
|
||||
}
|
||||
}
|
||||
|
@ -876,29 +881,6 @@ func (r *Result) RowsAffected() (int64, error) {
|
|||
return r.rowsAffected, nil
|
||||
}
|
||||
|
||||
func (r *Result) LastInsertId() (int64, error) {
|
||||
s, err := r.c.Prepare("select cast(@@identity as bigint)")
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
defer s.Close()
|
||||
rows, err := s.Query(nil)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
defer rows.Close()
|
||||
dest := make([]driver.Value, 1)
|
||||
err = rows.Next(dest)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
if dest[0] == nil {
|
||||
return -1, errors.New("There is no generated identity value")
|
||||
}
|
||||
lastInsertId := dest[0].(int64)
|
||||
return lastInsertId, nil
|
||||
}
|
||||
|
||||
var _ driver.Pinger = &Conn{}
|
||||
|
||||
// Ping is used to check if the remote server is available and satisfies the Pinger interface.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue