<commit_before>#include "DBInterface.h"
// ------------------------------------------------------------------------------------------
bool DBNetInterface::connect( const std::string& param )
{
	std::string host = "";
	std::string user = "";
	std::string pswd = "";
	std::string dbname = "";
	for(;;)
	{
		std::string::size_type pos = param.find_first_of("@");
		user = param.substr(0, pos);
		if( pos == std::string::npos )
			break;

		std::string::size_type prev = pos + 1;
		pos = param.find_first_of(":", prev);
		host = param.substr(prev, pos - prev);
		if( pos == std::string::npos )
			break;

		prev = pos + 1;
		pos = param.find_first_of(":", prev);
		pswd = param.substr(prev, pos - prev);
		if( pos == std::string::npos )
			break;

		prev = pos + 1;
		pos = param.find_first_of(":", prev);
		dbname = param.substr(prev, pos - prev);
		break;
	}
	return nconnect( host, user, pswd, dbname );
}
//--------------------------------------------------------------------------------------------
DBResult::ROW& DBResult::row()
{
	return row_;
}
// ----------------------------------------------------------------------------
DBResult::iterator DBResult::begin()
{
	return row_.begin();
}
// ----------------------------------------------------------------------------
DBResult::iterator DBResult::end()
{
	return row_.end();
}
// ----------------------------------------------------------------------------
DBResult::operator bool()
{
	return !row_.empty();<commit_msg>make style, new release<commit_after>#include "DBInterface.h"
// ------------------------------------------------------------------------------------------
bool DBNetInterface::connect( const std::string& param )
{
	std::string host = "";
	std::string user = "";
	std::string pswd = "";
	std::string dbname = "";
	for(;;)
	{
		std::string::size_type pos = param.find_first_of("@");
		user = param.substr(0, pos);
		if( pos == std::string::npos )
			break;

		std::string::size_type prev = pos + 1;
		pos = param.find_first_of(":", prev);
		host = param.substr(prev, pos - prev);
		if( pos == std::string::npos )
			break;

		prev = pos + 1;
		pos = param.find_first_of(":", prev);
		pswd = param.substr(prev, pos - prev);
		if( pos == std::string::npos )
			break;

		prev = pos + 1;
		pos = param.find_first_of(":", prev);
		dbname = param.substr(prev, pos - prev);
		break;
	}

	return nconnect( host, user, pswd, dbname );
}
//--------------------------------------------------------------------------------------------
DBResult::ROW& DBResult::row()
{
	return row_;
}
// ----------------------------------------------------------------------------
DBResult::iterator DBResult::begin()
{
	return row_.begin();
}
// ----------------------------------------------------------------------------
DBResult::iterator DBResult::end()
{
	return row_.end();
}
// ----------------------------------------------------------------------------
DBResult::operator bool()
{
	return !row_.empty();
{'fraction_non_alphanumeric': 0.4217111937774772, 'fraction_numerical': 0.002705444707473791, 'mean_word_length': 1.342042755344418, 'pattern_counts': {'":': 6, '<': 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': '1179168', 'n_tokens_mistral': 862, 'n_tokens_neox': 812, 'n_words': 178}