Skip to content

Instantly share code, notes, and snippets.

@antpk
antpk / SQL-Insert-Statements-Bulk-100per.sql.groovy
Created Mar 7, 2019
SQL Bulk insert export script for DataGrip with limit
View SQL-Insert-Statements-Bulk-100per.sql.groovy
SEP = ", "
QUOTE = "\'"
NEWLINE = System.getProperty("line.separator")
KEYWORDS_LOWERCASE = com.intellij.database.util.DbSqlUtil.areKeywordsLowerCase(PROJECT)
KW_INSERT_INTO = KEYWORDS_LOWERCASE ? "insert into " : "INSERT INTO "
KW_VALUES = KEYWORDS_LOWERCASE ? "values" : "VALUES"
KW_NULL = KEYWORDS_LOWERCASE ? "null" : "NULL"