<commit_before>h1. sql2o

p. Sql2o is a small java library, with the purpose of making database interaction easy. When fetching data from the
database, the resultset will automatically be filled into you POJO objects. Kind of like an ORM, but without the sql generation capabilities.

p. Here is a basic example.

bc. Sql2o.registerDriver(new com.mysql.jdbc.Driver());
bc.
bc. Sql2o sql2o = new Sql2o("dbc:mysql://127.0.0.1/testDB", "username", "password");
bc.
bc. User user = sql2o.createQuery("select id, firstName, lastName, email from Users where email = :email")
bc.    .addParameter("email", "<EMAIL>")
bc.    .executeAndFetchFirst(User.class);

p. Lets pretend you want to get a list of all users.

bc. List<User> = sql2o.createQuery("select id, firstName, lastName, email from Users).executeAndFetch(User.class);<commit_msg>playing arround with readme<commit_after>h1. sql2o

p. Sql2o is a small java library, with the purpose of making database interaction easy. When fetching data from the
database, the resultset will automatically be filled into you POJO objects. Kind of like an ORM, but without the sql generation capabilities.

p. Here is a basic example.

bc. Sql2o.registerDriver(new com.mysql.jdbc.Driver());

 Sql2o sql2o = new Sql2o("dbc:mysql://127.0.0.1/testDB", "username", "password");

 User user = sql2o.createQuery("select id, firstName, lastName, email from Users where email = :email")
    .addParameter("email", "<EMAIL>")
    .executeAndFetchFirst(User.class);

p. Lets pretend you want to get a list of all users.

bc. List<User> allUsers = sql2o.createQuery("select id, firstName, lastName, email from Users).executeAndFetch(User.class);
{'fraction_non_alphanumeric': 0.10771992818671454, 'fraction_numerical': 0.017953321364452424, 'mean_word_length': 4.62962962962963, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '5773183', 'n_tokens_mistral': 517, 'n_tokens_neox': 509, 'n_words': 199}