@@ -70,15 +70,15 @@ test_that("DB helpers work for MSSQL", {
70
70
DBI :: Id(catalog = " db_helpers_db" , schema = " schema_db_helpers_2" , table = " test_db_helpers_4" )
71
71
)
72
72
expect_identical(
73
- get_src_tbl_names(my_test_src(), schema = c(" dbo" , " schema_db_helpers" ))[[" dbo.test_db_helpers_2" ]],
73
+ get_src_tbl_names(my_test_src(), schema = c(" dbo" , " schema_db_helpers" ), names_pattern = " {.schema}.{.table} " )[[" dbo.test_db_helpers_2" ]],
74
74
DBI :: Id(schema = " dbo" , table = " test_db_helpers_2" )
75
75
)
76
76
expect_identical(
77
- get_src_tbl_names(my_test_src(), schema = c(" dbo" , " schema_db_helpers" ))[[" schema_db_helpers.test_db_helpers_2" ]],
77
+ get_src_tbl_names(my_test_src(), schema = c(" dbo" , " schema_db_helpers" ), names_pattern = " {.schema}.{.table} " )[[" schema_db_helpers.test_db_helpers_2" ]],
78
78
DBI :: Id(schema = " schema_db_helpers" , table = " test_db_helpers_2" )
79
79
)
80
80
expect_warning(
81
- out <- get_src_tbl_names(my_test_src(), schema = c(" dbo" , " schema_db_helpers" ), names = " {.table}" )[" test_db_helpers_2" ],
81
+ out <- get_src_tbl_names(my_test_src(), schema = c(" dbo" , " schema_db_helpers" ), names_pattern = " {.table}" )[" test_db_helpers_2" ],
82
82
' Local name test_db_helpers_2 will refer to <"dbo"."test_db_helpers_2">, rather than to <"schema_db_helpers"."test_db_helpers_2">' ,
83
83
fixed = TRUE
84
84
)
@@ -90,7 +90,7 @@ test_that("DB helpers work for MSSQL", {
90
90
))
91
91
)
92
92
expect_warning(
93
- out <- get_src_tbl_names(my_test_src(), schema = c(" schema_db_helpers" , " dbo" ), names = " {.table}" )[" test_db_helpers_2" ],
93
+ out <- get_src_tbl_names(my_test_src(), schema = c(" schema_db_helpers" , " dbo" ), names_pattern = " {.table}" )[" test_db_helpers_2" ],
94
94
' Local name test_db_helpers_2 will refer to <"schema_db_helpers"."test_db_helpers_2">, rather than to <"dbo"."test_db_helpers_2">' ,
95
95
fixed = TRUE
96
96
)
@@ -145,15 +145,15 @@ test_that("DB helpers work for Postgres", {
145
145
DBI :: Id(schema = " schema_db_helpers" , table = " test_db_helpers_2" )
146
146
)
147
147
expect_identical(
148
- get_src_tbl_names(my_test_src(), schema = c(" public" , " schema_db_helpers" ))[" public.test_db_helpers_2" ][[1 ]],
148
+ get_src_tbl_names(my_test_src(), schema = c(" public" , " schema_db_helpers" , names_pattern = " {.schema}.{.table} " ))[" public.test_db_helpers_2" ][[1 ]],
149
149
DBI :: Id(schema = " public" , table = " test_db_helpers_2" )
150
150
)
151
151
expect_identical(
152
- get_src_tbl_names(my_test_src(), schema = c(" public" , " schema_db_helpers" ))[" schema_db_helpers.test_db_helpers_2" ][[1 ]],
152
+ get_src_tbl_names(my_test_src(), schema = c(" public" , " schema_db_helpers" , names_pattern = " {.schema}.{.table} " ))[" schema_db_helpers.test_db_helpers_2" ][[1 ]],
153
153
DBI :: Id(schema = " schema_db_helpers" , table = " test_db_helpers_2" )
154
154
)
155
155
expect_warning(
156
- out <- get_src_tbl_names(my_test_src(), schema = c(" public" , " schema_db_helpers" ), names = " {.table}" )[" test_db_helpers_2" ],
156
+ out <- get_src_tbl_names(my_test_src(), schema = c(" public" , " schema_db_helpers" ), names_pattern = " {.table}" )[" test_db_helpers_2" ],
157
157
' Local name test_db_helpers_2 will refer to <"public"."test_db_helpers_2">, rather than to <"schema_db_helpers"."test_db_helpers_2">' ,
158
158
fixed = TRUE
159
159
)
@@ -165,7 +165,7 @@ test_that("DB helpers work for Postgres", {
165
165
))
166
166
)
167
167
expect_warning(
168
- out <- get_src_tbl_names(my_test_src(), schema = c(" schema_db_helpers" , " public" ), names = " {.table}" )[" test_db_helpers_2" ],
168
+ out <- get_src_tbl_names(my_test_src(), schema = c(" schema_db_helpers" , " public" ), names_pattern = " {.table}" )[" test_db_helpers_2" ],
169
169
' Local name test_db_helpers_2 will refer to <"schema_db_helpers"."test_db_helpers_2">, rather than to <"public"."test_db_helpers_2">' ,
170
170
fixed = TRUE
171
171
)
0 commit comments