Created
March 20, 2011 00:24
-
-
Save dustingetz/877941 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String sql_fmt = "INSERT INTO %s.%s (%s) VALUES (%s)"; | |
| String schema = context.getSchema(); | |
| String table = typeInfo.getRepeatingTableName(); | |
| CollectionUtil.transform_i(attrs, toSqlValues); | |
| String col_sql = StringUtils.join(attrs.keySet().toArray(), ","); | |
| String value_sql = StringUtils.join(attrs.values().toArray(), ","); //TreeSet key order maintained | |
| String sql = String.format(sql_fmt, schema, table, col_sql, value_sql); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment