File tree Expand file tree Collapse file tree 5 files changed +17
-7
lines changed
examples/bigquery_language_v2/definitions Expand file tree Collapse file tree 5 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -220,11 +220,11 @@ function buildSqlxLexer() {
220
220
} ;
221
221
sqlLexer [ SQL_LEXER_TOKEN_NAMES . SINGLE_LINE_COMMENT ] = {
222
222
match : / - - .* ?$ / ,
223
- value : ( value : string ) => value . replace ( / ` / g, "\\`" )
223
+ value : ( value : string ) => value . replace ( / ` / g, "\\`" ) . replace ( / \$ { / g , "\\${" )
224
224
} ;
225
225
sqlLexer [ SQL_LEXER_TOKEN_NAMES . MULTI_LINE_COMMENT ] = {
226
226
match : / \/ \* [ \s \S ] * ?\* \/ / ,
227
- value : ( value : string ) => value . replace ( / ` / g, "\\`" )
227
+ value : ( value : string ) => value . replace ( / ` / g, "\\`" ) . replace ( / \$ { / g , "\\${" )
228
228
} ;
229
229
sqlLexer [ SQL_LEXER_TOKEN_NAMES . SINGLE_QUOTE_STRING ] = / ' (?: \\ [ ' \\ ] | [ ^ \n ' \\ ] ) * ' / ;
230
230
sqlLexer [ SQL_LEXER_TOKEN_NAMES . DOUBLE_QUOTE_STRING ] = / " (?: \\ [ " \\ ] | [ ^ \n " \\ ] ) * " / ;
Original file line number Diff line number Diff line change 1
1
config { type: "table" }
2
2
select * from ${ref("sample_data")}
3
3
4
- -- here is a `comment
4
+ -- here ${"is"} a `comment
5
5
6
- /* another ` backtick ` containing ```comment */
6
+ /* ${" another"} ` backtick ` containing ```comment */
7
7
8
8
post_operations {
9
9
GRANT SELECT ON ${self()} TO GROUP "allusers@dataform.co"
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -e
3
3
4
+ if [ " $( git status --porcelain) " ]; then
5
+ echo " There are uncommitted changes; aborting." 1>&2
6
+ exit 1
7
+ fi
8
+
9
+ if [ " master" != " $( git branch --show-current) " ]; then
10
+ echo " Not on the 'master' branch; aborting." 1>&2
11
+ exit 1
12
+ fi
13
+
4
14
# Run all the tests.
5
15
6
16
bazel test //...
Original file line number Diff line number Diff line change @@ -667,7 +667,7 @@ describe("@dataform/api", () => {
667
667
expect ( exampleTable . query . trim ( ) ) . equals (
668
668
`select * from \`tada-analytics.${ schemaWithSuffix (
669
669
"df_integration_test"
670
- ) } .sample_data\`\n\n-- here is a \`comment\n\n/* another \` backtick \` containing \`\`\`comment */`
670
+ ) } .sample_data\`\n\n-- here \${"is"} a \`comment\n\n/* \${" another"} \` backtick \` containing \`\`\`comment */`
671
671
) ;
672
672
expect ( exampleTable . dependencies ) . deep . equals ( [ "sample_data" ] ) ;
673
673
expect ( exampleTable . preOps ) . to . eql ( [ ] ) ;
@@ -747,7 +747,7 @@ describe("@dataform/api", () => {
747
747
// Check testcase.
748
748
const testCase = graph . tests . find ( t => t . name === "example_test_case" ) ;
749
749
expect ( testCase . testQuery . trim ( ) ) . equals (
750
- "select * from (\n select 'hi' as faked union all\n select 'ben' as faked union all\n select 'sup?' as faked\n)\n\n-- here is a `comment\n\n/* another ` backtick ` containing ```comment */"
750
+ "select * from (\n select 'hi' as faked union all\n select 'ben' as faked union all\n select 'sup?' as faked\n)\n\n-- here ${\"is\"} a `comment\n\n/* ${\" another\"} ` backtick ` containing ```comment */"
751
751
) ;
752
752
expect ( testCase . expectedOutputQuery . trim ( ) ) . equals (
753
753
"select 'hi' as faked union all\nselect 'ben' as faked union all\nselect 'sup?' as faked"
Original file line number Diff line number Diff line change 1
1
# NOTE: If you change the format of this line, you must change the bash command
2
2
# in /scripts/publish to extract the version string correctly.
3
- DF_VERSION = "1.0.3 "
3
+ DF_VERSION = "1.0.4 "
You can’t perform that action at this time.
0 commit comments