wdiwtlt/service/test.groovy
2016-02-08 22:25:07 -06:00

24 lines
712 B
Groovy

import groovy.grape.Grape
import groovy.sql.Sql
Grape.grab(group: 'com.zaxxer', module: 'HikariCP', version: '2.4.3')
Grape.grab(group: 'org.postgresql', module: 'postgresql', version: '9.4.1207.jre7')
import com.jdbernard.wdiwtlt.db.ORM
import com.jdbernard.wdiwtlt.db.models.*
import com.zaxxer.hikari.*
import org.jaudiotagger.audio.*
import org.jaudiotagger.tag.*
config = new Properties()
config.dataSourceClassName = "org.postgresql.ds.PGSimpleDataSource"
config."dataSource.databaseName" = "wdiwtlt"
config."dataSource.user" = "jonathan"
config."dataSource.password" = ""
hcfg = new HikariConfig(config)
hds = new HikariDataSource(hcfg)
db = new ORM(hds)
musicDir = new File('/Users/jonathan/Music')