remove deprecated function

WithQueryCachePolicyKeepInCache is deprecated and already default behavior
This commit is contained in:
chrislu 2022-05-10 00:01:43 -07:00
parent a4ca3ed1f0
commit 791c29ae93

View File

@ -21,8 +21,7 @@ func (store *YdbStore) KvPut(ctx context.Context, key []byte, value []byte) (err
fileMeta := FileMeta{dirHash, name, dirStr, value} fileMeta := FileMeta{dirHash, name, dirStr, value}
return store.DB.Table().Do(ctx, func(ctx context.Context, s table.Session) (err error) { return store.DB.Table().Do(ctx, func(ctx context.Context, s table.Session) (err error) {
_, _, err = s.Execute(ctx, rwTX, *withPragma(&store.tablePathPrefix, insertQuery), _, _, err = s.Execute(ctx, rwTX, *withPragma(&store.tablePathPrefix, insertQuery),
fileMeta.queryParameters(0), fileMeta.queryParameters(0))
options.WithQueryCachePolicy(options.WithQueryCachePolicyKeepInCache()))
if err != nil { if err != nil {
return fmt.Errorf("kv put execute %s: %v", util.NewFullPath(dirStr, name).Name(), err) return fmt.Errorf("kv put execute %s: %v", util.NewFullPath(dirStr, name).Name(), err)
} }
@ -68,8 +67,7 @@ func (store *YdbStore) KvDelete(ctx context.Context, key []byte) (err error) {
_, _, err = s.Execute(ctx, rwTX, *withPragma(&store.tablePathPrefix, insertQuery), _, _, err = s.Execute(ctx, rwTX, *withPragma(&store.tablePathPrefix, insertQuery),
table.NewQueryParameters( table.NewQueryParameters(
table.ValueParam("$dir_hash", types.Int64Value(dirHash)), table.ValueParam("$dir_hash", types.Int64Value(dirHash)),
table.ValueParam("$name", types.UTF8Value(name))), table.ValueParam("$name", types.UTF8Value(name))))
options.WithQueryCachePolicy(options.WithQueryCachePolicyKeepInCache()))
if err != nil { if err != nil {
return fmt.Errorf("kv delete %s: %v", util.NewFullPath(dirStr, name).Name(), err) return fmt.Errorf("kv delete %s: %v", util.NewFullPath(dirStr, name).Name(), err)
} }