Replace Unsafe with Strict mechanism
Previously by default the presence of a missing field in a udt would result in an error reported. The Unsafe mechanism could be used to ignore these fields. This PR changes the default behavior to ignoring missing fields and only reporting an error if Strict mode is used. This approach is in line with the gocql.
This commit is contained in:
committed by
Sylwia Szunejko
parent
6a60650668
commit
7072863b0c
@@ -51,7 +51,7 @@ func (s Session) ContextQuery(ctx context.Context, stmt string, names []string)
|
||||
Names: names,
|
||||
Mapper: s.Mapper,
|
||||
tr: DefaultBindTransformer,
|
||||
unsafe: DefaultUnsafe,
|
||||
strict: DefaultStrict,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ func (s Session) Query(stmt string, names []string) *Queryx {
|
||||
Names: names,
|
||||
Mapper: s.Mapper,
|
||||
tr: DefaultBindTransformer,
|
||||
unsafe: DefaultUnsafe,
|
||||
strict: DefaultStrict,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user