|
4 | 4 | base_source$get_db_type() |
5 | 5 | Condition |
6 | 6 | Error in `base_source$get_db_type()`: |
7 | | - ! get_db_type() must be implemented by subclass |
| 7 | + ! `get_db_type()` must be implemented by subclass |
8 | 8 |
|
9 | 9 | --- |
10 | 10 |
|
11 | 11 | Code |
12 | 12 | base_source$get_schema() |
13 | 13 | Condition |
14 | 14 | Error in `base_source$get_schema()`: |
15 | | - ! get_schema() must be implemented by subclass |
| 15 | + ! `get_schema()` must be implemented by subclass |
16 | 16 |
|
17 | 17 | --- |
18 | 18 |
|
19 | 19 | Code |
20 | 20 | base_source$execute_query("SELECT * FROM test") |
21 | 21 | Condition |
22 | 22 | Error in `base_source$execute_query()`: |
23 | | - ! execute_query() must be implemented by subclass |
| 23 | + ! `execute_query()` must be implemented by subclass |
24 | 24 |
|
25 | 25 | --- |
26 | 26 |
|
27 | 27 | Code |
28 | 28 | base_source$test_query("SELECT * FROM test LIMIT 1") |
29 | 29 | Condition |
30 | 30 | Error in `base_source$test_query()`: |
31 | | - ! test_query() must be implemented by subclass |
| 31 | + ! `test_query()` must be implemented by subclass |
32 | 32 |
|
33 | 33 | --- |
34 | 34 |
|
35 | 35 | Code |
36 | 36 | base_source$get_data() |
37 | 37 | Condition |
38 | 38 | Error in `base_source$get_data()`: |
39 | | - ! get_data() must be implemented by subclass |
| 39 | + ! `get_data()` must be implemented by subclass |
40 | 40 |
|
41 | 41 | --- |
42 | 42 |
|
43 | 43 | Code |
44 | 44 | base_source$cleanup() |
45 | 45 | Condition |
46 | 46 | Error in `base_source$cleanup()`: |
47 | | - ! cleanup() must be implemented by subclass |
| 47 | + ! `cleanup()` must be implemented by subclass |
48 | 48 |
|
49 | 49 | # DataFrameSource$new() / errors with non-data.frame input |
50 | 50 |
|
|
76 | 76 | DataFrameSource$new(test_df, "123_invalid") |
77 | 77 | Condition |
78 | 78 | Error in `initialize()`: |
79 | | - ! `table_name` must be a valid SQL table name. |
| 79 | + ! `table_name` must be a valid SQL table name |
| 80 | + i Table names must begin with a letter and contain only letters, numbers, and underscores |
| 81 | + x You provided: "123_invalid" |
80 | 82 | Code |
81 | 83 | DataFrameSource$new(test_df, "table-name") |
82 | 84 | Condition |
83 | 85 | Error in `initialize()`: |
84 | | - ! `table_name` must be a valid SQL table name. |
| 86 | + ! `table_name` must be a valid SQL table name |
| 87 | + i Table names must begin with a letter and contain only letters, numbers, and underscores |
| 88 | + x You provided: "table-name" |
85 | 89 | Code |
86 | 90 | DataFrameSource$new(test_df, "table name") |
87 | 91 | Condition |
88 | 92 | Error in `initialize()`: |
89 | | - ! `table_name` must be a valid SQL table name. |
| 93 | + ! `table_name` must be a valid SQL table name |
| 94 | + i Table names must begin with a letter and contain only letters, numbers, and underscores |
| 95 | + x You provided: "table name" |
90 | 96 | Code |
91 | 97 | DataFrameSource$new(test_df, "") |
92 | 98 | Condition |
93 | 99 | Error in `initialize()`: |
94 | | - ! `table_name` must be a valid SQL table name. |
| 100 | + ! `table_name` must be a valid SQL table name |
| 101 | + i Table names must begin with a letter and contain only letters, numbers, and underscores |
| 102 | + x You provided: "" |
95 | 103 | Code |
96 | 104 | DataFrameSource$new(test_df, NULL) |
97 | 105 | Condition |
|
104 | 112 | DBISource$new(list(fake = "connection"), "test_table") |
105 | 113 | Condition |
106 | 114 | Error in `initialize()`: |
107 | | - ! `conn` must be a DBI connection |
| 115 | + ! `conn` must be a <DBIConnection>, not a list |
108 | 116 |
|
109 | 117 | --- |
110 | 118 |
|
111 | 119 | Code |
112 | 120 | DBISource$new(NULL, "test_table") |
113 | 121 | Condition |
114 | 122 | Error in `initialize()`: |
115 | | - ! `conn` must be a DBI connection |
| 123 | + ! `conn` must be a <DBIConnection>, not NULL |
116 | 124 |
|
117 | 125 | --- |
118 | 126 |
|
119 | 127 | Code |
120 | 128 | DBISource$new("not a connection", "test_table") |
121 | 129 | Condition |
122 | 130 | Error in `initialize()`: |
123 | | - ! `conn` must be a DBI connection |
| 131 | + ! `conn` must be a <DBIConnection>, not a string |
124 | 132 |
|
125 | 133 | # DBISource$new() / errors with invalid table_name types |
126 | 134 |
|
127 | 135 | Code |
128 | 136 | DBISource$new(db$conn, 123) |
129 | 137 | Condition |
130 | 138 | Error in `initialize()`: |
131 | | - ! `table_name` must be a single character string or a DBI::Id object |
| 139 | + ! `table_name` must be a single character string or a `DBI::Id()` object |
132 | 140 |
|
133 | 141 | --- |
134 | 142 |
|
135 | 143 | Code |
136 | 144 | DBISource$new(db$conn, c("table1", "table2")) |
137 | 145 | Condition |
138 | 146 | Error in `initialize()`: |
139 | | - ! `table_name` must be a single character string or a DBI::Id object |
| 147 | + ! `table_name` must be a single character string or a `DBI::Id()` object |
140 | 148 |
|
141 | 149 | --- |
142 | 150 |
|
143 | 151 | Code |
144 | 152 | DBISource$new(db$conn, list(name = "table")) |
145 | 153 | Condition |
146 | 154 | Error in `initialize()`: |
147 | | - ! `table_name` must be a single character string or a DBI::Id object |
| 155 | + ! `table_name` must be a single character string or a `DBI::Id()` object |
148 | 156 |
|
149 | 157 | # DBISource$new() / errors when table does not exist |
150 | 158 |
|
151 | 159 | Code |
152 | 160 | DBISource$new(db$conn, "non_existent_table") |
153 | 161 | Condition |
154 | | - Error: |
155 | | - ! ! Could not evaluate cli `{}` expression: `DBI::dbQuoteIdent...`. |
156 | | - Caused by error in `h(simpleError(msg, call))`: |
157 | | - ! error in evaluating the argument 'conn' in selecting a method for function 'dbQuoteIdentifier': object 'x' not found |
| 162 | + Error in `initialize()`: |
| 163 | + ! Table "`non_existent_table`" not found in database |
| 164 | + i If you're using a table in a catalog or schema, pass a `DBI::Id()` object to `table_name` |
158 | 165 |
|
159 | 166 | # assemble_system_prompt() / errors with non-DataSource input |
160 | 167 |
|
161 | 168 | Code |
162 | 169 | assemble_system_prompt(list(not = "a data source"), data_description = "Test") |
163 | 170 | Condition |
164 | 171 | Error in `assemble_system_prompt()`: |
165 | | - ! `source` must be a DataSource object |
| 172 | + ! `source` must be a <DataSource> object, not a list |
166 | 173 |
|
167 | 174 | --- |
168 | 175 |
|
169 | 176 | Code |
170 | 177 | assemble_system_prompt(data.frame(x = 1:3), data_description = "Test") |
171 | 178 | Condition |
172 | 179 | Error in `assemble_system_prompt()`: |
173 | | - ! `source` must be a DataSource object |
| 180 | + ! `source` must be a <DataSource> object, not a data frame |
174 | 181 |
|
0 commit comments