NLinker icon

Test two step rename

NLinker | PRO | 02/21/18 10:20:51 AM UTC | 0 ⭐ | 7169 👁️ | Never ⏰ | []
Scala |

880 B

|

None

|

0 👍

/

0 👎

package com.vertigo.mapping.persistence
 
import com.typesafe.config.ConfigFactory
import com.vertigo.mapping.persistence.MappingToResolver.{BaseTn, GenTnf, TempTn}
import com.vertigo.mapping.persistence.sql.SqlMetaUtils
 
object Test extends App {
 
  val config = ConfigFactory.parseString(
    """
      |jdbc {
      |  host = "localhost"
      |  port = 5432
      |  database = "vertigo_resolver_service_db"
      |  username = "postgres"
      |  password = "postgres"
      |  batchSize = 5000
      |}
    """.stripMargin)
  val dataSource = Utils.createDataSource(config)
 
  val (sql1, sql2) = SqlMetaUtils.buildTwoStepRenames(dataSource,
    BaseTn("spotify_mapping"),
    TempTn("spotify_mapping_temp"),
    GenTnf("spotify_mapping_" + _)
  )
 
  println(sql1)
  println(sql2)
 
  //Utils.executeUpdate(dataSource, sql1)
  //Utils.executeUpdate(dataSource, sql2)
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎