forked from oguimbal/pg-mem
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstring.ts
More file actions
24 lines (23 loc) · 667 Bytes
/
Copy pathstring.ts
File metadata and controls
24 lines (23 loc) · 667 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { DataType, FunctionDefinition } from '../interfaces-private';
export const stringFunctions: FunctionDefinition[] = [
{
name: 'lower',
args: [DataType.text],
returns: DataType.text,
implementation: (x: string) => x?.toLowerCase(),
},
{
name: 'upper',
args: [DataType.text],
returns: DataType.text,
implementation: (x: string) => x?.toUpperCase(),
},
{
name: 'concat',
args: [DataType.text],
argsVariadic: DataType.text,
returns: DataType.text,
allowNullArguments: true,
implementation: (...x: string[]) => x?.join(''),
},
]