|
212 | 212 | [_] |
213 | 213 | (->> |
214 | 214 | [driver.common/default-host-details |
215 | | -<<<<<<< HEAD |
216 | | - (assoc driver.common/default-port-details :placeholder 2881) |
217 | | -======= |
218 | 215 | (assoc driver.common/default-port-details |
219 | 216 | :placeholder 2881 |
220 | 217 | :helper-text "Port number (default: 2881)") |
221 | | ->>>>>>> origin/master |
222 | 218 | driver.common/default-dbname-details |
223 | 219 | driver.common/default-user-details |
224 | 220 | driver.common/default-password-details |
225 | 221 | driver.common/default-role-details |
226 | 222 | driver.common/advanced-options-start |
227 | 223 | (assoc driver.common/additional-options |
228 | | -<<<<<<< HEAD |
229 | | - :placeholder "useUnicode=true&characterEncoding=UTF-8&autoReconnect=true") |
230 | | -======= |
231 | 224 | :placeholder "useUnicode=true&characterEncoding=UTF-8&autoReconnect=true") |
232 | | ->>>>>>> origin/master |
233 | 225 | driver.common/default-advanced-options] |
234 | 226 | (into [] (mapcat u/one-or-many)))) |
235 | 227 |
|
|
346 | 338 |
|
347 | 339 | (defmethod driver/humanize-connection-error-message :oceanbase |
348 | 340 | [_ message] |
349 | | -<<<<<<< HEAD |
350 | | - (condp re-matches message |
351 | | - #"^Communications link failure\s+The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.$" |
352 | | - :cannot-connect-check-host-and-port |
353 | | - |
354 | | - #"^Unknown database .*$" |
355 | | - :database-name-incorrect |
356 | | - |
357 | | - #"Access denied for user.*$" |
358 | | - :username-or-password-incorrect |
359 | | - |
360 | | - #"Must specify port after ':' in connection string" |
361 | | - :invalid-hostname |
362 | | - |
363 | | - message)) |
364 | | -======= |
365 | 341 | (let [message-str (str message)] |
366 | 342 | (cond |
367 | 343 | (re-matches #"^Communications link failure\s+The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.$" message-str) |
|
377 | 353 | :invalid-hostname |
378 | 354 |
|
379 | 355 | :else message))) |
380 | | ->>>>>>> origin/master |
381 | 356 |
|
382 | 357 | (defmethod sql-jdbc.sync/excluded-schemas :oceanbase |
383 | 358 | [_] |
|
671 | 646 | (log/info "OceanBase describe-table for table:" table-name "schema:" schema) |
672 | 647 | (let [result (assoc (select-keys table [:name :schema]) |
673 | 648 | :fields (try |
674 | | -<<<<<<< HEAD |
675 | | - (let [fields (into #{} (sql-jdbc.sync/describe-fields driver database |
676 | | - :table-names [table-name] |
677 | | - :schema-names (when schema [schema])))] |
678 | | - (log/info "OceanBase describe-fields returned" (count fields) "fields for table" table-name) |
679 | | - (log/debug "OceanBase describe-fields result:" fields) |
680 | | - fields) |
681 | | -======= |
682 | 649 | ;; First, try to detect the mode for this specific connection |
683 | 650 | (let [mode (detect-mode-from-connection conn) |
684 | 651 | _ (log/info "OceanBase detected mode for table" table-name ":" mode)] |
|
722 | 689 | (log/info "OceanBase Oracle describe-fields returned" (count fields) "fields for table" table-name) |
723 | 690 | (log/debug "OceanBase Oracle describe-fields result:" fields) |
724 | 691 | fields))) |
725 | | ->>>>>>> origin/master |
726 | 692 | (catch Throwable e |
727 | 693 | (log/error e "Error retrieving fields for OceanBase table" schema "." table-name) |
728 | 694 | (try |
|
0 commit comments