feat(sql): Window Functions + MERGE statement + REST bridge plan
- Add Window Functions: ROW_NUMBER, RANK, DENSE_RANK, LEAD, LAG, FIRST_VALUE, LAST_VALUE, NTILE with PARTITION BY, ORDER BY, ROWS/RANGE frame specifications - Add MERGE/UPSERT statement with WHEN MATCHED UPDATE and WHEN NOT MATCHED INSERT - Add SQL/PGQ Property Graph long-term plan in PLAN_SQL_ADVANCED.md - Add 7 new tests for Window Functions and MERGE - Update baraql.md documentation
This commit is contained in:
@@ -120,6 +120,8 @@ type
|
||||
tkAvg
|
||||
tkMin
|
||||
tkMax
|
||||
tkMerge
|
||||
tkMatched
|
||||
tkArray
|
||||
tkVector
|
||||
tkGraph
|
||||
@@ -134,6 +136,24 @@ type
|
||||
tkDfs
|
||||
tkPath
|
||||
|
||||
# Window functions
|
||||
tkOver
|
||||
tkPartition
|
||||
tkRows
|
||||
tkRange
|
||||
tkUnbounded
|
||||
tkPreceding
|
||||
tkFollowing
|
||||
tkCurrent
|
||||
tkRowNumber
|
||||
tkRank
|
||||
tkDenseRank
|
||||
tkLead
|
||||
tkLag
|
||||
tkFirstValue
|
||||
tkLastValue
|
||||
tkNtile
|
||||
|
||||
# Operators
|
||||
tkPlus
|
||||
tkMinus
|
||||
@@ -291,6 +311,8 @@ const keywords*: Table[string, TokenKind] = {
|
||||
"avg": tkAvg,
|
||||
"min": tkMin,
|
||||
"max": tkMax,
|
||||
"merge": tkMerge,
|
||||
"matched": tkMatched,
|
||||
"array": tkArray,
|
||||
"vector": tkVector,
|
||||
"graph": tkGraph,
|
||||
@@ -301,6 +323,22 @@ const keywords*: Table[string, TokenKind] = {
|
||||
"bfs": tkBfs,
|
||||
"dfs": tkDfs,
|
||||
"path": tkPath,
|
||||
"over": tkOver,
|
||||
"partition": tkPartition,
|
||||
"rows": tkRows,
|
||||
"range": tkRange,
|
||||
"unbounded": tkUnbounded,
|
||||
"preceding": tkPreceding,
|
||||
"following": tkFollowing,
|
||||
"current": tkCurrent,
|
||||
"row_number": tkRowNumber,
|
||||
"rank": tkRank,
|
||||
"dense_rank": tkDenseRank,
|
||||
"lead": tkLead,
|
||||
"lag": tkLag,
|
||||
"first_value": tkFirstValue,
|
||||
"last_value": tkLastValue,
|
||||
"ntile": tkNtile,
|
||||
}.toTable
|
||||
|
||||
proc newLexer*(input: string): Lexer =
|
||||
|
||||
Reference in New Issue
Block a user