Skip to content

Commit

Permalink
Code format for InsertStatementContext (#33979)
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu authored Dec 9, 2024
1 parent f33a6a2 commit 830f9bc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ public InsertStatementContext(final ShardingSphereMetaData metaData, final List<
tablesContext = new TablesContext(getAllSimpleTableSegments(), getDatabaseType(), currentDatabaseName);
List<String> insertColumnNames = getInsertColumnNames();
ShardingSphereSchema schema = getSchema(metaData, currentDatabaseName);
columnNames = containsInsertColumns() ? insertColumnNames
columnNames = containsInsertColumns()
? insertColumnNames
: sqlStatement.getTable().map(optional -> schema.getVisibleColumnNames(optional.getTableName().getIdentifier().getValue())).orElseGet(Collections::emptyList);
insertColumnNamesAndIndexes = createInsertColumnNamesAndIndexes(insertColumnNames);
generatedKeyContext = new GeneratedKeyContextEngine(sqlStatement, schema).createGenerateKeyContext(insertColumnNamesAndIndexes, insertValueContexts, params).orElse(null);
Expand Down

0 comments on commit 830f9bc

Please sign in to comment.