|
Gradle-DatabasePlugin V1.0.12 | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD | |||||||
java.lang.Objectorg.gradle.api.DefaultTask
au.com.coherentsoftware.gradle.database.task.DbBaseTask
au.com.coherentsoftware.gradle.database.task.DbInit
class DbInit extends DbBaseTask
Gradle Task to initialise a database from a file containing SQL statements. Database user must have appropriate permissions. See the DatabasePlugin documentation for sample use.
| Property Summary | |
|---|---|
def |
dataFile
|
String |
database
|
| Method Summary | |
|---|---|
File
|
getDataFile()
Convert datafile to a File object, using Project's file(). |
String
|
getDescription()
Customises the description of this task according to the datafile it is to load, and the database it is to update. |
def
|
importSql()
Use the mysql client (which must be on the path) to invoke the SQL statements in the specified datafile against the specified database. |
| Property Detail |
|---|
def dataFile
String database
| Method Detail |
|---|
File getDataFile()
String getDescription()
@TaskAction def importSql()
Copyright 2014 Coherent Software Australia Pty Ltd