kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | c06dc4e78c859110c7555f99924cdd27dbbb604ba8cf547ac295377f525d65e5 |
|---|---|
| Author | olim7t <omichallat+github@gmail.com> · 2015-06-26 19:54 +02:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2015-06-26 19:54 +02:00 |
| Parents | d3ae2055778c |
2 files changed
modified driver-core/src/main/java/com/datastax/driver/core/querybuilder/Select.java +11 −9
| @@ -347,14 +347,6 @@ | ||
| 347 | 347 | */ |
| 348 | 348 | public abstract SelectionOrAlias column(String name); |
| 349 | 349 | |
| 350 | - /** | |
| 351 | - * Selects the provided raw expression. | |
| 352 | - * | |
| 353 | - * @param rawString the raw expression to add. | |
| 354 | - * @return this in-build SELECT statement | |
| 355 | - */ | |
| 356 | - public abstract SelectionOrAlias raw(String rawString); | |
| 357 | - | |
| 358 | 350 | /** |
| 359 | 351 | * Selects the write time of provided column. |
| 360 | 352 | * <p> |
| @@ -478,7 +470,17 @@ | ||
| 478 | 470 | return queueName(name); |
| 479 | 471 | } |
| 480 | 472 | |
| 481 | - @Override | |
| 473 | + /** | |
| 474 | + * Selects the provided raw expression. | |
| 475 | + * | |
| 476 | + * This method is used internally by the mapper module. It is not exposed on the parent class {@link Selection} to | |
| 477 | + * avoid breaking binary compatibility. This means that it is not accessible directly via the fluent API (you need | |
| 478 | + * a cast). This shouldn't be a problem for regular clients because they will use other methods of the DSL | |
| 479 | + * ({@code fcall}, etc.) rather than provide a raw string. | |
| 480 | + * | |
| 481 | + * @param rawString the raw expression to add. | |
| 482 | + * @return this in-build SELECT statement | |
| 483 | + */ | |
| 482 | 484 | public SelectionOrAlias raw(String rawString) { |
| 483 | 485 | return queueName(QueryBuilder.raw(rawString)); |
| 484 | 486 | } |
modified driver-mapping/src/main/java/com/datastax/driver/mapping/QueryType.java +1 −1
| @@ -75,7 +75,7 @@ | ||
| 75 | 75 | Select.Selection selection = select(); |
| 76 | 76 | for (ColumnMapper cm : mapper.allColumns()) { |
| 77 | 77 | Select.SelectionOrAlias column = (cm.kind == ColumnMapper.Kind.COMPUTED) |
| 78 | - ? selection.raw(cm.getColumnName()) | |
| 78 | + ? ((Select.SelectionOrAlias)selection).raw(cm.getColumnName()) | |
| 79 | 79 | : selection.column(cm.getColumnName()); |
| 80 | 80 | |
| 81 | 81 | if (cm.getAlias() == null) { |