Migrated source documentation to doc.jdb-labs.com.
This commit is contained in:
@ -5,8 +5,7 @@ import com.jdbernard.nlsongs.model.*
|
||||
import java.text.SimpleDateFormat
|
||||
|
||||
sdf = new SimpleDateFormat('yyyy-MM-dd')
|
||||
hcfg = new
|
||||
HikariConfig("/home/jdbernard/projects/new-life-songs/src/main/webapp/WEB-INF/classes/datasource.properties")
|
||||
hcfg = new HikariConfig("/home/jdbernard/projects/new-life-songs/src/main/webapp/WEB-INF/classes/datasource.properties")
|
||||
|
||||
makeService = { svcRow ->
|
||||
Service svc = new Service()
|
||||
|
@ -1,32 +0,0 @@
|
||||
package com.jdbernard.nlsongs.db
|
||||
|
||||
public class GenerateQueries {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
}
|
||||
|
||||
public static Map<String, Map<String, String> > generateQueries(String ddl) {
|
||||
|
||||
def tables = [:]
|
||||
|
||||
// Find the table definitions
|
||||
String tableRegex = /(?ms)(?:CREATE TABLE (?:IF NOT EXISTS )?([^\s]+) \(([^\s]+);.+?)+/
|
||||
|
||||
ddl.eachMatch(tableRegex) { matchGroups ->
|
||||
String tableName = matchGroups[1]
|
||||
|
||||
// Parse the column definitions.
|
||||
|
||||
// Create new record insert statements.
|
||||
|
||||
// Create insert queries.
|
||||
|
||||
// Create update queries.
|
||||
|
||||
// Create delete queries.
|
||||
|
||||
// Create ID lookup queries.
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user