Shardingsphere: Can the shardingColumn for InlineShardingStrategy in The shardingProxy be a string (it's not a numeric string)?

Created on 9 Nov 2020  ·  2Comments  ·  Source: apache/shardingsphere

question

Most helpful comment

There are many cases for shardingColumn, but generally my answer is YES.

/**
 * Sharding value for precise.
 */
@RequiredArgsConstructor
@Getter
@ToString
public final class PreciseShardingValue<T extends Comparable<?>> implements ShardingValue {

    private final String logicTableName;

    private final String columnName;

    private final T value; // Here it is T
}

All 2 comments

There are many cases for shardingColumn, but generally my answer is YES.

/**
 * Sharding value for precise.
 */
@RequiredArgsConstructor
@Getter
@ToString
public final class PreciseShardingValue<T extends Comparable<?>> implements ShardingValue {

    private final String logicTableName;

    private final String columnName;

    private final T value; // Here it is T
}

thank you very much.

At 2020-11-09 10:38:13, "Juan Pan(Trista)" notifications@github.com wrote:

There are many cases for shardingColumn, but generally my answer ti YES.
``
/**

Sharding value for precise.
*/
@RequiredArgsConstructor
@getter
@tostring
public final class PreciseShardingValue> implements ShardingValue {

private final String logicTableName;

private final String columnName;

private final T value; // Here it is T
}


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Was this page helpful?
0 / 5 - 0 ratings