924438567 opened a new issue, #18556:
URL: https://github.com/apache/shardingsphere/issues/18556
mybatis3.5.9 + sharding jdbc5.1.1
sql:
insert into qy_barrage(cus_no, send_time, barrage, create_time, update_time,
create_user, update_user)
values (#{cusNo}, #{sendTime}, #{barrage}, #{createTime}, #{updateTime},
#{createUser}, #{updateUser})
database
CREATE TABLE qy_barrage_aaa_2022 (
id bigint unsigned NOT NULL,
```
spring:
shardingsphere:
datasource:
names: ds0
ds0:
url: jdbc:mysql://localhost:3306/data_op
username: root
password: 924438567
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.zaxxer.hikari.HikariDataSource
rules:
sharding:
tables:
qy_barrage:
actual-data-nodes: ds0.qy_barrage_$->{'(。)*'}_$->{2022..9999}
table-strategy:
complex:
sharding-columns: cus_no,send_time
sharding-algorithm-name: complexDsAlgorithm
key-generate-strategy:
column: id
key-generator-name: snow
sharding-algorithms:
complexDsAlgorithm:
props:
sharding-columns: cus_no,send_time
algorithm-expression:
qy_barrage_$->{cus_no}_$->{send_time.split("-")[0]}
type: COMPLEX_INLINE
key-generators:
snow:
type: SNOWFLAKE
props:
sql-show: true
mybatis:
mapper-locations: classpath:mapper/*.xml
```
but when I change the actual-data-nodes from
ds0.qy_barrage_$->{'(。)*'}$->{2022..9999} to ds0.qy_barrage ->{2022..9999}, it
works correctly!!! why?
--
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:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]