Skip to content

Commit

Permalink
fix some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
chobits committed Oct 31, 2024
1 parent 651b4ac commit 1f652d5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions kong/db/declarative/import.lua
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,11 @@ local function _set_entity_for_txn(t, entity_name, item, options, is_delete)
-- select_by_cache_key
if schema.cache_key then
local cache_key = dao:cache_key(item)
-- ws_id is a placeholder here, because cache_key is unique globally.
local _ws_id = get_default_workspace() -- avoid overwriting the outer ws_id
local key = unique_field_key(entity_name, _ws_id, "cache_key", cache_key)
-- The second parameter (ws_id) is a placeholder here, because the cache_key
-- is already unique globally.
local key = unique_field_key(entity_name, get_default_workspace(),
"cache_key", cache_key)
-- store item_key or nil into lmdb
t:set(key, idx_value)
end

Expand Down

0 comments on commit 1f652d5

Please sign in to comment.