<commit_before>/* <x0/sql/SqlConnection.cpp>
 *
 * This file is part of the x0 web server project and is released under LGPL-3.
 * http://www.xzero.io/
 *
 * (c) 2010-2011 <NAME> <<EMAIL>>
 */

#include <x0/sql/SqlConnection.h>
#include <x0/sql/SqlResult.h>

#include <stdio.h>
#include <mysql/mysql.h>
#include <mysql/errmsg.h>

namespace x0 {

SqlConnection::SqlConnection() :
	handle_(NULL)
{
	mysql_init(&handle_);
}

SqlConnection::~SqlConnection()
{
	mysql_close(&handle_);
}

bool SqlConnection::open(const char *hostname, const char *username, const char *passwd, const char *database, int port)<commit_msg>sql: SqlConnection: fully initialize SqlConnection<commit_after>/* <x0/sql/SqlConnection.cpp>
 *
 * This file is part of the x0 web server project and is released under LGPL-3.
 * http://www.xzero.io/
 *
 * (c) 2010-2011 <NAME> <<EMAIL>>
 */

#include <x0/sql/SqlConnection.h>
#include <x0/sql/SqlResult.h>

#include <stdio.h>
#include <mysql/mysql.h>
#include <mysql/errmsg.h>

namespace x0 {

SqlConnection::SqlConnection() :
	handle_(),
	username_(),
	passwd_(),
	database_(),
	hostname_(),
	port_(-1)
{
	mysql_init(&handle_);
}

SqlConnection::~SqlConnection()
{
	mysql_close(&handle_);
}

bool SqlConnection::open(const char *hostname, const char *username, const char *passwd, const char *database, int port)
{'fraction_non_alphanumeric': 0.1595184349134688, 'fraction_numerical': 0.0218209179834462, 'mean_word_length': 4.9375, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4791200', 'n_tokens_mistral': 488, 'n_tokens_neox': 475, 'n_words': 116}