Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement