xr2117 commented on issue #13615:
URL:
https://github.com/apache/shardingsphere/issues/13615#issuecomment-969661240
Mybatis savebatch method used
Print SQL
INSERT INTO internal_questions (
pick_count,
parent_id,
is_choice,
questions_type_id,
questions_type_name,
questions_type_detail_id,
questions_type_detail_name,
content,
answer,
line_number,
option_a,
option_b,
difficulty_id,
difficulty_name,
is_charged,
is_group_question,
origin,
upload_batch,
examine_status,
is_down,
is_check,
create_time,
create_by,
update_time,
update_by,
is_deleted
)
VALUES
(
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?
)
config:
spring:
shardingsphere:
props:
sql-show: true
datasource:
common:
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
names: ds1
ds1:
password: xxx
url: xxx
username: xxx
rules:
sharding:
key-generators:
snowflake:
props:
max-vibration-offset: 2048
worker-id: 1
type: SNOWFLAKE
sharding-algorithms:
tbstrategy:
props:
algorithm-expression: questions_$->{id % 2 + 1}
type: INLINE
tables:
questions:
actual-data-nodes: ds1.questions_$->{1..2}
key-generate-strategy:
column: id
key-generator-name: snowflake
table-strategy:
standard:
sharding-algorithm-name: tbstrategy
sharding-column: id
--
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]