💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows
Python agentsaiai-agentsembeddingsinformation-retrievallanguage-modellarge-language-modelsllmnlppythonragretrieval-augmented-generationsearchsearch-enginesemantic-searchsentence-embeddingstransformerstxtaivector-databasevector-search
Add support for SQL concat operator, closes #223
davidmezzettifca12b535877
diff --git a/src/python/txtai/database/sql/base.py b/src/python/txtai/database/sql/base.pyindex c85529c5..3bfc5312 100644--- a/src/python/txtai/database/sql/base.py+++ b/src/python/txtai/database/sql/base.py@@ -112,7 +112,7 @@ class SQL:# - Punctuation chars are parsed as standalone tokens which helps identify operators# - Add additional wordchars to prevent splitting on those values# - Disable comments- tokens = shlex(StringIO(query), punctuation_chars="=!<>+-*/%")+ tokens = shlex(StringIO(query), punctuation_chars="=!<>+-*/%|")tokens.wordchars += ":@#"tokens.commenters = ""tokens = list(tokens)diff --git a/src/python/txtai/database/sql/token.py b/src/python/txtai/database/sql/token.pyindex a8d5b5ed..fbcb61f9 100644--- a/src/python/txtai/database/sql/token.py+++ b/src/python/txtai/database/sql/token.py@@ -12,7 +12,7 @@ class Token:SIMILAR_TOKEN = "__SIMILAR__"# Default list of comparison operators- OPERATORS = ["=", "!=", "<>", ">", ">=", "<", "<=", "+", "-", "*", "/", "%", "not", "between", "like", "is", "null"]+ OPERATORS = ["=", "!=", "<>", ">", ">=", "<", "<=", "+", "-", "*", "/", "%", "||", "not", "between", "like", "is", "null"]# Default list of logic separatorsLOGIC_SEPARATORS = ["and", "or"]