Skip to content

Commit

Permalink
Add tableOptions code
Browse files Browse the repository at this point in the history
  • Loading branch information
takapi327 committed Oct 10, 2023
1 parent b39600d commit 85a5c3e
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ private[ldbc] object TableModelGenerator:
s".keySet(table => ${ key.toCode("table", classNameFormatter, propertyNameFormatter) })"
)

val tableOptions = statement.options.fold("")(
_.map(option => s".setOption(${ Table.buildTableOptionCode(option) })").mkString("\n ")
)

val builder = ColumnCodeBuilder(classNameFormatter)

val columns =
Expand All @@ -111,6 +115,7 @@ private[ldbc] object TableModelGenerator:
| ${ columns.mkString(",\n ") }
| )
| ${ keyDefinitions.mkString("\n ") }
| $tableOptions
|""".stripMargin

Files.write(outputFile.toPath, scalaSource.getBytes(summon[Codec].name))
Expand Down

0 comments on commit 85a5c3e

Please sign in to comment.