pjfanning commented on code in PR #276:
URL: 
https://github.com/apache/pekko-persistence-jdbc/pull/276#discussion_r2003946154


##########
core/src/main/scala/org/apache/pekko/persistence/jdbc/testkit/internal/SchemaType.scala:
##########
@@ -26,6 +26,11 @@ import org.apache.pekko.annotation.InternalApi
  */
 @InternalApi private[jdbc] case object Postgres extends SchemaType
 
+/**
+ * INTERNAL API
+ */
+@InternalApi private[jdbc] case object PostgresPekkoSchema extends SchemaType

Review Comment:
   Again, I don't know why we need a new schema type, I would prefer to fix the 
existing Postgres one.



##########
core/src/main/resources/schema/postgres/postgres-create-schema-pekko.sql:
##########
@@ -0,0 +1,64 @@
+CREATE SCHEMA IF NOT EXISTS pekko;

Review Comment:
   I don't understand why we need more sql files - can't we correct the 
existing ones?



##########
core/src/main/resources/schema/postgres/postgres-create-schema-pekko.sql:
##########
@@ -0,0 +1,64 @@
+CREATE SCHEMA IF NOT EXISTS pekko;

Review Comment:
   if we can't change the existing postgres sql files - could we just produce a 
diff sql that can be run like this?
   * run existing postgres script
   * optionally run an additional script to get the change in behaviour that 
you want



##########
core/src/main/scala/org/apache/pekko/persistence/jdbc/config/PekkoPersistenceConfig.scala:
##########
@@ -223,6 +223,7 @@ class DurableStateTableConfiguration(config: Config) {
   val columnNames: DurableStateTableColumnNames = new 
DurableStateTableColumnNames(config)
   val stateSequenceConfig = DurableStateSequenceRetrievalConfig(config)
   override def toString: String = 
s"DurableStateTableConfiguration($tableName,$schemaName,$columnNames)"
+  def schemaAndTableName: String = schemaName.map(_ + ".").getOrElse("") + 
tableName

Review Comment:
   I think toString should be last function.
   
   With the new function, can you add `@since 1.1.1`?



##########
core/src/main/scala/org/apache/pekko/persistence/jdbc/config/PekkoPersistenceConfig.scala:
##########
@@ -223,6 +223,7 @@ class DurableStateTableConfiguration(config: Config) {
   val columnNames: DurableStateTableColumnNames = new 
DurableStateTableColumnNames(config)
   val stateSequenceConfig = DurableStateSequenceRetrievalConfig(config)
   override def toString: String = 
s"DurableStateTableConfiguration($tableName,$schemaName,$columnNames)"
+  def schemaAndTableName: String = schemaName.map(_ + ".").getOrElse("") + 
tableName

Review Comment:
   please don't `+` strings - use String interpolation or something like that



-- 
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-unsubscr...@pekko.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org
For additional commands, e-mail: notifications-h...@pekko.apache.org

Reply via email to