<commit_before>package main

import (
	"database/sql"
	"errors"
	"fmt"

	_ "github.com/lib/pq"
)

const (
	host     = "localhost"
	port     = 5432
	user     = "jeffdecola"
	password = ""
	dbname   = "jeff_db_example"
)

func main() {

	psqlInfo := fmt.Sprintf("host=%s port=%d sslmode=disable dbname=%s user=%s password=%s",
		host, port, dbname, user, password)
	db, err := sql.Open("postgres", psqlInfo)
	if err != nil {
		fmt.Println("could not open sql")
		panic(err)
	}
	defer db.Close()

	err = db.Ping()
	if err != nil {
		fmt.Println("no ping")
		panic(err)
	}

	fmt.Println("Successfully connected to db!")

	// CREATE A NEW ROW (id=3)
	/*
		fmt.Printf("CREATE A NEW ROW (id=3)\n")
		_, err = db.Exec(`<commit_msg>udpating postgres<commit_after>package main

import (
	"database/sql"
	"errors"
	"fmt"

	_ "github.com/lib/pq"
)

const (
	host     = "localhost"
	port     = 5432
	user     = "jeffd"
	password = ""
	dbname   = "jeff_db_example"
)

func main() {

	psqlInfo := fmt.Sprintf("host=%s port=%d sslmode=disable dbname=%s user=%s password=%s",
		host, port, dbname, user, password)
	db, err := sql.Open("postgres", psqlInfo)
	if err != nil {
		fmt.Println("could not open sql")
		panic(err)
	}
	defer db.Close()

	err = db.Ping()
	if err != nil {
		fmt.Println("no ping")
		panic(err)
	}

	fmt.Println("Successfully connected to db!")

	// CREATE A NEW ROW (id=3)
	/*
		fmt.Printf("CREATE A NEW ROW (id=3)\n")
		_, err = db.Exec(`
{'fraction_non_alphanumeric': 0.17024221453287197, 'fraction_numerical': 0.008304498269896194, 'mean_word_length': 3.3293413173652695, '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': '3289883', 'n_tokens_mistral': 624, 'n_tokens_neox': 590, 'n_words': 138}