Skip to content

Commit 08d65df

Browse files
author
Jove Zhong
committed
Update prompt_template.py
1 parent 2dd95f0 commit 08d65df

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mcp_timeplus/prompt_template.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@
241241
`ALL`: The `ALL` keyword in SQL specifies that operations should retain all duplicate rows, as seen in commands like `UNION ALL`, `INTERSECT ALL`, and `EXCEPT ALL`, which follow bag semantics instead of eliminating duplicates., Examples: ['UNION ALL\n\n```sql\nSELECT * FROM range(2) t1(x)\nUNION ALL\nSELECT * FROM range(3) t2(x);\n```\nThis example demonstrates using `UNION ALL` to combine rows from two queries without eliminating duplicates.', 'INTERSECT ALL\n\n```sql\nSELECT unnest([5, 5, 6, 6, 6, 6, 7, 8]) AS x\nINTERSECT ALL\nSELECT unnest([5, 6, 6, 7, 7, 9]);\n```\nThis example shows using `INTERSECT ALL` to select rows that are present in both result sets, keeping duplicate values.', 'EXCEPT ALL\n\n```sql\nSELECT unnest([5, 5, 6, 6, 6, 6, 7, 8]) AS x\nEXCEPT ALL\nSELECT unnest([5, 6, 6, 7, 7, 9]);\n```\nThis example illustrates `EXCEPT ALL`, which selects all rows present in the first query but not in the second, without removing duplicates.', 'ORDER BY ALL\n\n```sql\nSELECT *\nFROM addresses\nORDER BY ALL;\n```\nThis SQL command uses `ORDER BY ALL` to sort the result set by all columns sequentially from left to right.']
242242
`LIKE`: The `LIKE` expression is used to determine if a string matches a specified pattern, allowing wildcard characters such as `_` to represent any single character and `%` to match any sequence of characters., Examples: ["SELECT 'abc' LIKE 'abc'; -- true", "SELECT 'abc' LIKE 'a%'; -- true", "SELECT 'abc' LIKE '_b_'; -- true", "SELECT 'abc' LIKE 'c'; -- false", "SELECT 'abc' LIKE 'c%'; -- false", "SELECT 'abc' LIKE '%c'; -- true", "SELECT 'abc' NOT LIKE '%c'; -- false", "SELECT 'abc' ILIKE '%C'; -- true"]
243243
244+
Never use any SQL keyword starting with `current_`, such as current_date, current_timestamp. They are not available in Timeplus.
245+
244246
Finally here is a TypeScript source code file which is from our web console for SQL autocomplete. This includes most of the SQL functions. Each key of the map is the function name, with an object as the value. In the object, `doc` is an array of strings that contains the documentation for the function(first string as the syntax, second string as the example, and the 3rd as the description), and `linkPrefix` is the documentation link without the URL domain. FOr example functions_for_type means more information is available at https://docs.timeplus.com/functions_for_type You may retrieve the web page content on the fly to get more information.
245247
246248
export const builtinFunctionsWithDocAndLink: Record<string, { doc: (string | undefined)[]; linkPrefix: string }> = {

0 commit comments

Comments
 (0)