fix copy format case
This commit is contained in:
parent
a844b5d31d
commit
2f2dcfd762
@ -10,7 +10,7 @@ module.exports = {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(copyQuery.includes(' WITH ') && copyQuery.includes('FORMAT ')) {
|
||||
if(copyQuery.includes(' WITH') && copyQuery.includes('FORMAT ')) {
|
||||
const regex = /\bFORMAT\s+(\w+)/;
|
||||
const result = regex.exec(copyQuery);
|
||||
|
||||
|
@ -9,6 +9,7 @@ describe('query info', function () {
|
||||
"COPY copy_endpoints_test (id, name) FROM STDIN WITH (FORMAT CSV, DELIMITER ',', HEADER true)",
|
||||
"COPY copy_endpoints_test (id, name) FROM STDIN WITH (FORMAT CSV , DELIMITER ',', HEADER true)",
|
||||
"COPY copy_endpoints_test (id, name) FROM STDIN WITH (FORMAT CSV)",
|
||||
"COPY copy_endpoints_test FROM STDIN WITH(FORMAT csv,HEADER true)"
|
||||
];
|
||||
|
||||
validQueries.forEach(query => {
|
||||
|
Loading…
Reference in New Issue
Block a user