You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/03/30 10:22:42 UTC
[GitHub] [shardingsphere] cloudgyb opened a new issue #9880: inline expression user${age<50?0:1} invalid?
cloudgyb opened a new issue #9880:
URL: https://github.com/apache/shardingsphere/issues/9880
## inline expression user${age<50?0:1} invalid?
The value of expression is always 1!Why?
my project configuration(Spring Boot + sharding jdbc):
spring:
shardingsphere:
datasource:
names: db0,db1
db0:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbcUrl: jdbc:mysql://192.168.60.128:13306/test?useUnicode=true&serverTimezone=Asia/Shanghai
username: root
password: 123456
db1:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbcUrl: jdbc:mysql://192.168.60.128:13316/test?userUnicode=true&serverTimezone=GMT%2b8
username: root
password: 123456
props:
sql:
show: true
sharding:
tables:
user:
actual-data-nodes: db0.user${0..1},db1.user${0..1}
database-strategy: #分库策略
inline:
sharding-column: age
algorithm-expression: db${age%2}
table-strategy: #分表策略
inline:
sharding-column: age
algorithm-expression: user${age<50?0:1}
key-generator:
column: id
type: SNOWFLAKE
worker.id: 123
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] cloudgyb commented on issue #9880: inline expression user${age<50?0:1} invalid?
Posted by GitBox <gi...@apache.org>.
cloudgyb commented on issue #9880:
URL: https://github.com/apache/shardingsphere/issues/9880#issuecomment-812999937
> @cloudgyb Hi, which version do you use?
4.1.1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] dongzl commented on issue #9880: inline expression user${age<50?0:1} invalid?
Posted by GitBox <gi...@apache.org>.
dongzl commented on issue #9880:
URL: https://github.com/apache/shardingsphere/issues/9880#issuecomment-811869482
@cloudgyb Hi, which version do you use?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu closed issue #9880: inline expression user${age<50?0:1} invalid?
Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #9880:
URL: https://github.com/apache/shardingsphere/issues/9880
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu commented on issue #9880: inline expression user${age<50?0:1} invalid?
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #9880:
URL: https://github.com/apache/shardingsphere/issues/9880#issuecomment-927253158
No response anymore, I just close the issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zhujunxxxxx commented on issue #9880: inline expression user${age<50?0:1} invalid?
Posted by GitBox <gi...@apache.org>.
zhujunxxxxx commented on issue #9880:
URL: https://github.com/apache/shardingsphere/issues/9880#issuecomment-810146122
please use bug report template.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org