Loading .travis.yml +3 −0 Original line number Diff line number Diff line cache: directories: - "$HOME/.m2" language: java jdk: - oraclejdk8 Loading RELEASE-NOTES.md +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #### Core 1. [ISSUE #373](https://github.com/sharding-sphere/sharding-sphere/issues/373) Support `order by ?` 1. [ISSUE #610](https://github.com/sharding-sphere/sharding-sphere/issues/610) Route unicast for DQL without table 1. [ISSUE #701](https://github.com/sharding-sphere/sharding-sphere/issues/701) Caching parsed results to improve performance 1. [ISSUE #773](https://github.com/sharding-sphere/sharding-sphere/issues/773) Support sharding and autoincrement key of INSERT without column names Loading RELEASE-NOTES_ZH.md +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #### 内核 1. [ISSUE #373](https://github.com/sharding-sphere/sharding-sphere/issues/373) 支持`order by ?` 1. [ISSUE #610](https://github.com/sharding-sphere/sharding-sphere/issues/610) 无表名称的DQL采用单播路由 1. [ISSUE #701](https://github.com/sharding-sphere/sharding-sphere/issues/701) 缓存SQL解析结果以提升性能 1. [ISSUE #773](https://github.com/sharding-sphere/sharding-sphere/issues/773) 支持不包含列名的INSERT语句的分片与自增主键 Loading sharding-jdbc/src/main/java/io/shardingsphere/core/executor/event/AbstractExecutionEvent.java→sharding-core/src/main/java/io/shardingsphere/core/event/ShardingEvent.java +17 −14 Original line number Diff line number Diff line Loading @@ -15,37 +15,40 @@ * </p> */ package io.shardingsphere.core.executor.event; package io.shardingsphere.core.event; import com.google.common.base.Optional; import lombok.Getter; import lombok.Setter; import java.util.UUID; /** * SQL execution event. * Sharding event. * * @author zhangliang */ public abstract class AbstractExecutionEvent { @Getter public class ShardingEvent { private final String id = UUID.randomUUID().toString(); @Getter @Setter private EventExecutionType eventExecutionType = EventExecutionType.BEFORE_EXECUTE; private ShardingEventType eventType = ShardingEventType.BEFORE_EXECUTE; @Setter private Exception exception; /** * Get exception. * Set execute success. */ public void setExecuteSuccess() { eventType = ShardingEventType.EXECUTE_SUCCESS; } /** * Set execute failure. * * @return exception * @param cause fail cause */ public Optional<? extends Exception> getException() { return Optional.fromNullable(exception); public void setExecuteFailure(final Exception cause) { eventType = ShardingEventType.EXECUTE_FAILURE; exception = cause; } } sharding-core/src/main/java/io/shardingsphere/core/util/EventBusInstance.java→sharding-core/src/main/java/io/shardingsphere/core/event/ShardingEventBusInstance.java +5 −5 Original line number Diff line number Diff line Loading @@ -15,26 +15,26 @@ * </p> */ package io.shardingsphere.core.util; package io.shardingsphere.core.event; import com.google.common.eventbus.EventBus; import lombok.AccessLevel; import lombok.NoArgsConstructor; /** * Event bus for singleton instance. * Sharding event bus for singleton instance. * * @author zhangliang */ @NoArgsConstructor(access = AccessLevel.PRIVATE) public final class EventBusInstance { public final class ShardingEventBusInstance { private static final EventBus INSTANCE = new EventBus(); /** * Get event bus instance. * Get sharding event bus instance. * * @return event bus instance * @return sharding event bus instance */ public static EventBus getInstance() { return INSTANCE; Loading Loading
.travis.yml +3 −0 Original line number Diff line number Diff line cache: directories: - "$HOME/.m2" language: java jdk: - oraclejdk8 Loading
RELEASE-NOTES.md +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #### Core 1. [ISSUE #373](https://github.com/sharding-sphere/sharding-sphere/issues/373) Support `order by ?` 1. [ISSUE #610](https://github.com/sharding-sphere/sharding-sphere/issues/610) Route unicast for DQL without table 1. [ISSUE #701](https://github.com/sharding-sphere/sharding-sphere/issues/701) Caching parsed results to improve performance 1. [ISSUE #773](https://github.com/sharding-sphere/sharding-sphere/issues/773) Support sharding and autoincrement key of INSERT without column names Loading
RELEASE-NOTES_ZH.md +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #### 内核 1. [ISSUE #373](https://github.com/sharding-sphere/sharding-sphere/issues/373) 支持`order by ?` 1. [ISSUE #610](https://github.com/sharding-sphere/sharding-sphere/issues/610) 无表名称的DQL采用单播路由 1. [ISSUE #701](https://github.com/sharding-sphere/sharding-sphere/issues/701) 缓存SQL解析结果以提升性能 1. [ISSUE #773](https://github.com/sharding-sphere/sharding-sphere/issues/773) 支持不包含列名的INSERT语句的分片与自增主键 Loading
sharding-jdbc/src/main/java/io/shardingsphere/core/executor/event/AbstractExecutionEvent.java→sharding-core/src/main/java/io/shardingsphere/core/event/ShardingEvent.java +17 −14 Original line number Diff line number Diff line Loading @@ -15,37 +15,40 @@ * </p> */ package io.shardingsphere.core.executor.event; package io.shardingsphere.core.event; import com.google.common.base.Optional; import lombok.Getter; import lombok.Setter; import java.util.UUID; /** * SQL execution event. * Sharding event. * * @author zhangliang */ public abstract class AbstractExecutionEvent { @Getter public class ShardingEvent { private final String id = UUID.randomUUID().toString(); @Getter @Setter private EventExecutionType eventExecutionType = EventExecutionType.BEFORE_EXECUTE; private ShardingEventType eventType = ShardingEventType.BEFORE_EXECUTE; @Setter private Exception exception; /** * Get exception. * Set execute success. */ public void setExecuteSuccess() { eventType = ShardingEventType.EXECUTE_SUCCESS; } /** * Set execute failure. * * @return exception * @param cause fail cause */ public Optional<? extends Exception> getException() { return Optional.fromNullable(exception); public void setExecuteFailure(final Exception cause) { eventType = ShardingEventType.EXECUTE_FAILURE; exception = cause; } }
sharding-core/src/main/java/io/shardingsphere/core/util/EventBusInstance.java→sharding-core/src/main/java/io/shardingsphere/core/event/ShardingEventBusInstance.java +5 −5 Original line number Diff line number Diff line Loading @@ -15,26 +15,26 @@ * </p> */ package io.shardingsphere.core.util; package io.shardingsphere.core.event; import com.google.common.eventbus.EventBus; import lombok.AccessLevel; import lombok.NoArgsConstructor; /** * Event bus for singleton instance. * Sharding event bus for singleton instance. * * @author zhangliang */ @NoArgsConstructor(access = AccessLevel.PRIVATE) public final class EventBusInstance { public final class ShardingEventBusInstance { private static final EventBus INSTANCE = new EventBus(); /** * Get event bus instance. * Get sharding event bus instance. * * @return event bus instance * @return sharding event bus instance */ public static EventBus getInstance() { return INSTANCE; Loading