Example #1
0
func NewBulkInsert() (bulk.Insert, error) {
	table := `CREATE TEMP TABLE %s (
		uuid UUID,
		name TEXT,
		tld INT
	) ON COMMIT DROP`
	tableName := "_domain__%s"
	bi, err := bulk.NewInsert(tableName, table, "uuid", "name", "tld")
	return bi, err
}
Example #2
0
func NewBulkInsert() (bulk.Insert, error) {
	table := `CREATE TEMP TABLE %s (
		uuid UUID,
		domain UUID,
		name TEXT,
		args jsonb,
		record_type INT,
		parser_date DATE
	) ON COMMIT DROP`
	tableName := "_record__%s"
	bi, err := bulk.NewInsert(tableName, table, "uuid", "domain", "name", "args", "record_type", "parser_date")
	return bi, err
}