<commit_before>package sqlbuilder

import "strconv"

// DBMS represents a DBMS.
type DBMS int

const (
	MySQL    DBMS = iota // MySQL
	Postgres             // Postgres
)

// Placeholder returns the placeholder string for the given index.
func (dbms DBMS) Placeholder(idx int) string {
	switch dbms {
	case MySQL:
		return "?"
	case Postgres:
		return "$" + strconv.Itoa(idx+1)
	default:
		panic("unknown DBMS")
	}
}

// Select returns a SELECT statement.
func (dbms DBMS) Select(table string) *SelectStatement {
	return &SelectStatement{
		dbms:  dbms,
		table: table,
	}
}

// Insert returns an INSERT statement.
func (dbms DBMS) Insert(table string) *InsertStatement {
	return &InsertStatement{
		dbms:  dbms,
		table: table,
	}
}

// Update returns an UPDATE statement.
func (dbms DBMS) Update(table string) *UpdateStatement {
	return &UpdateStatement{
		dbms:  dbms,
		table: table,
	}
}

// DefaultDBMS is the DBMS used by the package-level Select, Insert and Update functions.
var DefaultDBMS = MySQL

// Select returns a SELECT statement using the default Database.
func Select(table string) *SelectStatement {
	return DefaultDBMS.Select(table)
}

// Insert returns an INSERT statement using the default Database.
func Insert(table string) *InsertStatement {
	return DefaultDBMS.Insert(table)
}

// Update returns an UPDATE statement using the default Database.
func Update(table string) *UpdateStatement {
	return DefaultDBMS.Update(table)
}
<commit_msg>Prefix panic message with package name<commit_after>package sqlbuilder

import "strconv"

// DBMS represents a DBMS.
type DBMS int

const (
	MySQL    DBMS = iota // MySQL
	Postgres             // Postgres
)

// Placeholder returns the placeholder string for the given index.
func (dbms DBMS) Placeholder(idx int) string {
	switch dbms {
	case MySQL:
		return "?"
	case Postgres:
		return "$" + strconv.Itoa(idx+1)
	default:
		panic("sqlbuilder: unknown DBMS")
	}
}

// Select returns a SELECT statement.
func (dbms DBMS) Select(table string) *SelectStatement {
	return &SelectStatement{
		dbms:  dbms,
		table: table,
	}
}

// Insert returns an INSERT statement.
func (dbms DBMS) Insert(table string) *InsertStatement {
	return &InsertStatement{
		dbms:  dbms,
		table: table,
	}
}

// Update returns an UPDATE statement.
func (dbms DBMS) Update(table string) *UpdateStatement {
	return &UpdateStatement{
		dbms:  dbms,
		table: table,
	}
}

// DefaultDBMS is the DBMS used by the package-level Select, Insert and Update functions.
var DefaultDBMS = MySQL

// Select returns a SELECT statement using the default Database.
func Select(table string) *SelectStatement {
	return DefaultDBMS.Select(table)
}

// Insert returns an INSERT statement using the default Database.
func Insert(table string) *InsertStatement {
	return DefaultDBMS.Insert(table)
}

// Update returns an UPDATE statement using the default Database.
func Update(table string) *UpdateStatement {
	return DefaultDBMS.Update(table)
}

{'fraction_non_alphanumeric': 0.09084768659236744, 'fraction_numerical': 0.0006754474839581223, 'mean_word_length': 3.9949409780775715, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5231538', 'n_tokens_mistral': 945, 'n_tokens_neox': 900, 'n_words': 320}