Skip to content

Commit f4ecd81

Browse files
committed
fix: contant string with case sensitive in all db
1 parent 11b8807 commit f4ecd81

6 files changed

Lines changed: 17 additions & 10 deletions

File tree

pegjs/noql.pegjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3955,9 +3955,9 @@ jsonb_expr
39553955

39563956
string_constants_escape
39573957
= 'E'i"'" __ n:single_char* __ "'" {
3958-
// => { type: 'origin'; value: string; }
3958+
// => { type: 'default'; value: string; }
39593959
return {
3960-
type: 'origin',
3960+
type: 'default',
39613961
value: `E'${n.join('')}'`
39623962
}
39633963
}

pegjs/postgresql.pegjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4651,9 +4651,9 @@ jsonb_expr
46514651

46524652
string_constants_escape
46534653
= 'E'i"'" __ n:single_char* __ "'" {
4654-
// => { type: 'origin'; value: string; }
4654+
// => { type: 'default'; value: string; }
46554655
return {
4656-
type: 'origin',
4656+
type: 'default',
46574657
value: `E'${n.join('')}'`
46584658
}
46594659
}

pegjs/redshift.pegjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3986,9 +3986,9 @@ jsonb_expr
39863986

39873987
string_constants_escape
39883988
= 'E'i"'" __ n:single_char* __ "'" {
3989-
// => { type: 'origin'; value: string; }
3989+
// => { type: 'default'; value: string; }
39903990
return {
3991-
type: 'origin',
3991+
type: 'default',
39923992
value: `E'${n.join('')}'`
39933993
}
39943994
}

pegjs/snowflake.pegjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3424,9 +3424,9 @@ jsonb_expr
34243424

34253425
string_constants_escape
34263426
= 'E'i"'" __ n:single_char* __ "'" {
3427-
// => { type: 'origin'; value: string; }
3427+
// => { type: 'default'; value: string; }
34283428
return {
3429-
type: 'origin',
3429+
type: 'default',
34303430
value: `E'${n.join('')}'`
34313431
}
34323432
}

pegjs/trino.pegjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3392,9 +3392,9 @@ jsonb_expr
33923392

33933393
string_constants_escape
33943394
= 'E'i"'" __ n:single_char* __ "'" {
3395-
// => { type: 'origin'; value: string; }
3395+
// => { type: 'default'; value: string; }
33963396
return {
3397-
type: 'origin',
3397+
type: 'default',
33983398
value: `E'${n.join('')}'`
33993399
}
34003400
}

test/postgres.spec.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1868,6 +1868,13 @@ describe('Postgres', () => {
18681868
"COMMENT ON EXTENSION pgcrypto IS 'HELLO WORLD'"
18691869
]
18701870
},
1871+
{
1872+
title: 'constant string with case sensitive',
1873+
sql: [
1874+
"SELECT * FROM users WHERE id = E'one'",
1875+
`SELECT * FROM "users" WHERE id = E'one'`
1876+
]
1877+
},
18711878
]
18721879
function neatlyNestTestedSQL(sqlList){
18731880
sqlList.forEach(sqlInfo => {

0 commit comments

Comments
 (0)