Skip to content

Commit

Permalink
Merge pull request #23 from fenix-hub/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
fenix-hub authored Jul 8, 2021
2 parents 4fdfbb7 + 4a9a7db commit e84feb1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions addons/supabase/Database/query.gd
Original file line number Diff line number Diff line change
Expand Up @@ -211,17 +211,15 @@ func Or(column : String, value : String) -> SupabaseQuery:
return self

# Text Search
func text_seach(column : String, query : String, _named_properties : Dictionary = {}) -> SupabaseQuery:
var type : String = _named_properties.get("type", "")
func text_seach(column : String, query : String, type : String = "", config : String = "") -> SupabaseQuery:
var filter : int
match type:
"plain": filter = Filters.PLFTS
"phrase": filter = Filters.PHFLTS
"websearch": filter = Filters.WFTS
_: filter = Filters.FTS
_named_properties.erase("type")
query = query.replacen(" ", "%20")
filter(column, filter, query, _named_properties)
filter(column, filter, query, {config = config})
return self

func clean() -> void:
Expand Down

0 comments on commit e84feb1

Please sign in to comment.