<commit_before>package column

import (
	"fmt"
	"strings"
)

// StringColumn models a column with a string type.
type StringColumn struct {
	name      string
	length    int
	modifiers []string
}

// String creates a new string column.
func String(name string, length int) *StringColumn {
	return &StringColumn{
		name:   name,
		length: length,
	}
}

// CreateSQL generates the SQL needed to create the column.
func (col *StringColumn) CreateSQL() string {
	modifiers := strings.Join(col.modifiers, " ")
	return fmt.Sprintf("`%s` VARCHAR(%d) %s", col.name, col.length, modifiers)
}

// NotNull flags the column so it can't contain NULLs.
func (col *StringColumn) NotNull() *StringColumn {
	col.modifiers = append(col.modifiers, "NOT NULL")
	return col
}

// PrimaryKey flags the column as the primary key of the table.
func (col *StringColumn) PrimaryKey() *StringColumn {
	col.modifiers = append(col.modifiers, "PRIMARY KEY")
	return col
}<commit_msg>Add method to position string column in the schema<commit_after>package column

import (
	"fmt"
	"strings"
)

// StringColumn models a column with a string type.
type StringColumn struct {
	name      string
	length    int
	modifiers []string
}

// String creates a new string column.
func String(name string, length int) *StringColumn {
	return &StringColumn{
		name:   name,
		length: length,
	}
}

// CreateSQL generates the SQL needed to create the column.
func (col *StringColumn) CreateSQL() string {
	modifiers := strings.Join(col.modifiers, " ")
	return fmt.Sprintf("`%s` VARCHAR(%d) %s", col.name, col.length, modifiers)
}

// NotNull flags the column so it can't contain NULLs.
func (col *StringColumn) NotNull() *StringColumn {
	col.modifiers = append(col.modifiers, "NOT NULL")
	return col
}

// PrimaryKey flags the column as the primary key of the table.
func (col *StringColumn) PrimaryKey() *StringColumn {
	col.modifiers = append(col.modifiers, "PRIMARY KEY")
	return col
}

// After sets the column next to the one we're inserting as a reference point
// for the update/create column.
func (col *StringColumn) After(name string) *IntegerColumn {
	col.modifiers = append(col.modifiers, fmt.Sprintf("AFTER `%s`", name))
	return col
}
{'fraction_non_alphanumeric': 0.11090909090909092, 'fraction_numerical': 0.0, 'mean_word_length': 4.178823529411765, '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': '1305087', 'n_tokens_mistral': 692, 'n_tokens_neox': 678, 'n_words': 249}