import com.intellij.database.model.DasTable import com.intellij.database.util.Case import com.intellij.database.util.DasUtil import java.io.* import java.text.SimpleDateFormat /* * Available context bindings: * SELECTION Iterable<DasObject> * PROJECT project * FILES files helper */ packageName ...
authorName= "zsy"FILES.chooseDirectoryAndSave("Choose directory", "Choose where to store generated files") { dir ->SELECTION.filter { itinstanceofDasTable && it.getKind() ==ObjectKind.TABLE }.each { generate(it, dir) } } def generate(table, dir) { def className= javaClassName(table.ge...
Generate Lombok POJOs.groovy: import com.intellij.database.model.DasTableimport com.intellij.database.util.Caseimport com.intellij.database.util.DasUtil import java.time.LocalDate /* * Available context bindings: * SELECTION Iterable<DasObject> * PROJECT project * FILES files helper */...
schema = \"后面添加自己的表空间名称(mysql可以不添加, 不用这个schema属性也行) 这里可以根据提示修改 import com.intellij.database.model.DasTable import com.intellij.database.model.ObjectKind import com.intellij.database.util.Case import com.intellij.database.util.DasUtil import java.text.SimpleDateF...
SELECTION.filter { itinstanceofDasTable && it.getKind() == ObjectKind.TABLE }.each { generate(it, dir) } }defgenerate(table, dir) {defclassName = javaName(table.getName(),true)deffields = calcFields(table) packageName = getPackageName(dir) ...
i)/):"String"]FILES.chooseDirectoryAndSave("Choose directory","Choose where to store generated files"){dir->SELECTION.filter{itinstanceofDasTable&&it.getKind()==ObjectKind.TABLE}.each{generate(it,dir)}}defgenerate(table,dir){def className=javaName(table.getName(),true)def fields=calcFields(...
SELECTION.filter { itinstanceofDasTable && it.getKind == ObjectKind.TABLE }.each { generate(it, dir) } } defgenerate(table, dir){ def className = javaClassName(table.getName,true) def fields = calcFields(table) packageName = getPackageName(dir) ...
有些人觉得database设置好像没什么用,顶多看看数据字段什么的,那就错了: 它可以在你写sql的时候会弹出一些字段提示: 可以直接根据表生成对应的pojo: 附上我的常用生成pojo配置: importcom.intellij.database.model.DasTableimportcom.intellij.database.model.ObjectKindimportcom.intellij.database.util.Caseimportcom...
i)/):"String"]FILES.chooseDirectoryAndSave("Choose directory","Choose where to store generated files"){dir->SELECTION.filter{itinstanceofDasTable&&it.getKind()==ObjectKind.TABLE}.each{generate(it,dir)}}defgenerate(table,dir){def className=javaClassName(table.getName(),true)def fields=...
i)/):"String"]FILES.chooseDirectoryAndSave("Choose directory","Choose where to store generated files"){dir->SELECTION.filter{itinstanceofDasTable&&it.getKind()==ObjectKind.TABLE}.each{generate(it,dir)}}defgenerate(table,dir){def className=javaClassName(table.getName(),true)def fields=...