You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewDatabaseObjectException(object, "Failed to write to object: " + sql, exception);
34
+
thrownewDatabaseObjectException(object, ExaError.messageBuilder("E-TDBJ-13").message("Failed to write to object: {{sql}}", sql).toString(), exception);
35
35
}
36
36
}
37
37
@@ -86,8 +86,7 @@ public void write(final Table table, final Stream<List<Object>> rows) {
86
86
} catch (finalSQLExceptionexception) {
87
87
thrownewDatabaseObjectException(table,
88
88
ExaError.messageBuilder("E-TDBJ-2")
89
-
.message("Failed to create prepared statement {{statement}} for insert.")
90
-
.parameter("statement", sql).toString(),
89
+
.message("Failed to create prepared statement {{statement}} for insert.", sql).toString(),
91
90
exception);
92
91
}
93
92
}
@@ -101,7 +100,7 @@ private void writeRow(final Table table, final String sql, final PreparedStateme
thrownewDatabaseObjectException("Unable to execute SQL from file: " + sqlFile, exception);
148
+
thrownewDatabaseObjectException(ExaError.messageBuilder("E-TDBJ-14").message("Unable to execute SQL from file: {{sqlFile}}", sqlFile).toString(), exception);
"Got {{column names size}} column names but {{column types}} column types. Please provide the same number of parameters for both when creating a table.", columnNames.size(), columnTypes.size())
thrownewIllegalStateException(name + " is a required field. Please provide a value by calling " + name
75
-
+ "() before build().");
75
+
thrownewIllegalStateException(ExaError.messageBuilder("E-TDBJ-15").message("{{name}} is a required field. Please provide a value by calling {{name|uq}}() before build().", name).toString());
Copy file name to clipboardExpand all lines: src/main/java/com/exasol/dbbuilder/dialects/Schema.java
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
importjava.util.List;
4
4
5
+
importcom.exasol.errorreporting.ExaError;
6
+
5
7
/**
6
8
* Database schema.
7
9
*/
@@ -87,7 +89,6 @@ default boolean hasParent() {
87
89
88
90
@Override
89
91
defaultDatabaseObjectgetParent() {
90
-
thrownewDatabaseObjectException(this,
91
-
"Illegal attempt to access parent object of a SCHEMA which is a top-level object.");
92
+
thrownewDatabaseObjectException(this,ExaError.messageBuilder("E-TDBJ-16").message("Illegal attempt to access parent object of a SCHEMA which is a top-level object.").toString());
"Column count mismatch. Tried to insert row with {{actual}} values into table {{table name}} which has {{expected}} columns. If this is a bulk insert, multiple other rows might have already been written. Consider a rollback on the connection, to discard the changes.")
"Column count mismatch. Tried to insert row with {{actual}} values into table {{table name}} which has {{expected}} columns. If this is a bulk insert, multiple other rows might have already been written. Consider a rollback on the connection, to discard the changes.", row.size(), getFullyQualifiedName(), getColumnCount())
Copy file name to clipboardExpand all lines: src/main/java/com/exasol/dbbuilder/dialects/User.java
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,8 @@
3
3
importjava.util.Map;
4
4
importjava.util.Set;
5
5
6
+
importcom.exasol.errorreporting.ExaError;
7
+
6
8
/**
7
9
* Database user.
8
10
*/
@@ -66,7 +68,6 @@ default boolean hasParent() {
66
68
67
69
@Override
68
70
defaultDatabaseObjectgetParent() {
69
-
thrownewDatabaseObjectException(this,
70
-
"Illegal attempt to access parent object of a USER which is a top-level object.");
71
+
thrownewDatabaseObjectException(this,ExaError.messageBuilder("E-TDBJ-17").message("Illegal attempt to access parent object of a USER which is a top-level object.").toString());
* Definition of a connection to another database or service.
@@ -92,8 +93,7 @@ public boolean hasParent() {
92
93
93
94
@Override
94
95
publicDatabaseObjectgetParent() {
95
-
thrownewDatabaseObjectException(this,
96
-
"Illegal attempt to access parent object of a CONNECTION which is a top-level object.");
96
+
thrownewDatabaseObjectException(this, ExaError.messageBuilder("E-TDBJ-8").message("Illegal attempt to access parent object of a CONNECTION which is a top-level object.").toString());
Copy file name to clipboardExpand all lines: src/main/java/com/exasol/dbbuilder/dialects/exasol/ExasolImmediateDatabaseObjectWriter.java
+3-5Lines changed: 3 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -78,9 +78,7 @@ public void write(final ConnectionDefinition definition) {
78
78
} else {
79
79
if (definition.hasPassword()) {
80
80
thrownewDatabaseObjectException(definition,
81
-
"User name missing when trying to write connection definition "
82
-
+ definition.getFullyQualifiedName()
83
-
+ ". Please always provide user name and password together or not at all.");
81
+
ExaError.messageBuilder("E-TDBJ-5").message("User name missing when trying to write connection definition {{definition name}}. Please always provide user name and password together or not at all.", definition.getFullyQualifiedName()).toString());
84
82
} else {
85
83
writeToObject(definition, "CREATE CONNECTION " + definition.getFullyQualifiedName() + " TO '"
86
84
+ definition.getTarget() + "'");
@@ -271,7 +269,7 @@ public int execute(final Script script, final Object... parameterValues) {
0 commit comments