sql: modify TRIM() function signature
According to the ANSI standard, ltrim, rtrim and trim should be merged into one unified TRIM() function. The specialization of trimming (left, right or both and trimming characters) determined in arguments of this function. Closes #3879 @TarantoolBot document Title: TRIM() function Modify signature of SQL function TRIM(). This function removes characters included in <trim character> (binary) string from <trim source> (binary) string until encounter a character that doesn't belong to <trim character>. Removal occurs on the side, specified by <trim specification>. Now, syntax is following: TRIM([ [ <trim specification> ] [ <trim character> ] FROM ] <trim source>). <trim specification> can be one of the following keywords: LEADING, TRAILING and BOTH. <trim character> is the set of trimming characters. <trim source> is the string, that will be trimmed. If FROM is specified, then: 1) Either <trim specification> or <trim character> or both shall be specified. 2) If <trim specification> is not specified, then BOTH is implicit. 3) If <trim character> is not specified, then ' ' is implicit.
Showing
- extra/mkkeywordhash.c 4 additions, 0 deletionsextra/mkkeywordhash.c
- src/box/sql/func.c 183 additions, 98 deletionssrc/box/sql/func.c
- src/box/sql/parse.y 50 additions, 5 deletionssrc/box/sql/parse.y
- src/box/sql/parse_def.c 3 additions, 1 deletionsrc/box/sql/parse_def.c
- src/box/sql/parse_def.h 1 addition, 1 deletionsrc/box/sql/parse_def.h
- src/box/sql/sqlInt.h 11 additions, 0 deletionssrc/box/sql/sqlInt.h
- test/sql-tap/badutf1.test.lua 7 additions, 7 deletionstest/sql-tap/badutf1.test.lua
- test/sql-tap/func.test.lua 78 additions, 35 deletionstest/sql-tap/func.test.lua
- test/sql-tap/with1.test.lua 1 addition, 1 deletiontest/sql-tap/with1.test.lua
Loading
Please register or sign in to comment