| 378 | |
| 379 | // ///// Execute a sqlcmd |
| 380 | public SqlResult sql(String sqlCommand, String errorMessage) throws DDFException { |
| 381 | try { |
| 382 | // sqlCommand = sqlCommand.replace("@this", this.getTableName()); |
| 383 | // TODO: what is format? |
| 384 | // return this.getManager().sql(String.format(sqlCommand, this.getTableName())); |
| 385 | sqlCommand = sqlCommand.replace("@this", "{1}"); |
| 386 | sqlCommand = String.format(sqlCommand, "{1}"); |
| 387 | SQLDataSourceDescriptor sqlDS = new SQLDataSourceDescriptor(sqlCommand, |
| 388 | null, null, null, this.getUUID().toString()); |
| 389 | return this.getManager().sql(sqlCommand, null, sqlDS); |
| 390 | } catch (DDFException e) { |
| 391 | throw e; |
| 392 | } catch (Exception e) { |
| 393 | throw new DDFException(String.format(errorMessage, this.getTableName()), e); |
| 394 | } |
| 395 | } |
| 396 | |
| 397 | public SqlTypedResult sqlTyped(String sqlCommand, String errorMessage) throws DDFException { |
| 398 | try { |