Skip to content

Commit

Permalink
feat(filemanager): add index for key prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalenic committed Aug 23, 2024
1 parent ebef9c4 commit 3911207
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
-- A gin index on attributes supported the `@?` operator and jsonpath queries.
create index attributes_index on s3_object using gin (attributes jsonb_path_ops);
-- An index on keys helps querying by prefix.
create index key_index on s3_object (key text_pattern_ops);
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl Wildcard {
pub fn contains_wildcard(&self) -> bool {
!self.wildcard_positions().0.is_empty()
}

/// Convert this wildcard to a postgres jsonbpath `like_regex` string, escaping relevant characters.
pub fn to_like_regex(&self) -> Result<String> {
// Valid postgres regex characters need to be escaped.
Expand Down

0 comments on commit 3911207

Please sign in to comment.