<commit_before>#pragma once
/*
 * mock_classes.h
 *
 *  Created on: 19.12.2014
 *      Author: mwarsinsky
 */


#include "gmock/gmock.h"

#include "cpp_odbc/connection.h"
#include "pydbc/column.h"


namespace pydbc_test {

	class mock_connection : public cpp_odbc::connection {
	public:
		mock_connection();
		~mock_connection();
		MOCK_CONST_METHOD0( do_make_statement, std::shared_ptr<cpp_odbc::statement const>());
		MOCK_CONST_METHOD2( do_set_attribute, void(SQLINTEGER, long));
		MOCK_CONST_METHOD0( do_commit, void());
		MOCK_CONST_METHOD0( do_rollback, void());
		MOCK_CONST_METHOD1( do_get_string_info, std::string(SQLUSMALLINT info_type));
	};


	class mock_statement : public cpp_odbc::statement {
	public:
		mock_statement();
		~mock_statement();
		MOCK_CONST_METHOD1( do_get_integer_attribute, long(SQLINTEGER));
		MOCK_CONST_METHOD2( do_set_attribute, void(SQLINTEGER, long));
		MOCK_CONST_METHOD2( do_set_attribute, void(SQLINTEGER, SQLULEN *));
		MOCK_CONST_METHOD1( do_execute, void(std::string const &));
		MOCK_CONST_METHOD1( do_prepare, void(std::string const &));
		MOCK_CONST_METHOD4( do_bind_input_parameter, void(SQLUSMALLINT, SQLSMALLINT, SQLSMALLINT, cpp_odbc::multi_value_buffer &));
		MOCK_CONST_METHOD0( do_execute_prepared, void());
		MOCK_CONST_METHOD0( do_number_of_columns, short int());
		MOCK_CONST_METHOD0( do_number_of_parameters, short int());
		MOCK_CONST_METHOD3( do_bind_column, void(SQLUSMALLINT, SQLSMALLINT, cpp_odbc::multi_value_buffer &));
		MOCK_CONST_METHOD0( do_fetch_next, bool());
		MOCK_CONST_METHOD0( do_close_cursor, void());
		MOCK_CONST_METHOD2( do_get_integer_column_attribute, long(SQLUSMALLINT, SQLUSMALLINT));
		MOCK_CONST_METHOD2( do_get_string_column_attribute, std::string(SQLUSMALLINT, SQLUSMALLINT));
		MOCK_CONST_METHOD0( do_row_count, SQLLEN());
		MOCK_CONST_METHOD1( do_describe_column, cpp_odbc::column_description(SQLUSMALLINT));
		MOCK_CONST_METHOD1( do_describe_parameter, cpp_odbc::column_description(SQLUSMALLINT));
	};




}


<commit_msg>Adjust mock class to match extended statement interface<commit_after>#pragma once
/*
 * mock_classes.h
 *
 *  Created on: 19.12.2014
 *      Author: mwarsinsky
 */


#include "gmock/gmock.h"

#include "cpp_odbc/connection.h"
#include "pydbc/column.h"


namespace pydbc_test {

	class mock_connection : public cpp_odbc::connection {
	public:
		mock_connection();
		~mock_connection();
		MOCK_CONST_METHOD0( do_make_statement, std::shared_ptr<cpp_odbc::statement const>());
		MOCK_CONST_METHOD2( do_set_attribute, void(SQLINTEGER, long));
		MOCK_CONST_METHOD0( do_commit, void());
		MOCK_CONST_METHOD0( do_rollback, void());
		MOCK_CONST_METHOD1( do_get_string_info, std::string(SQLUSMALLINT info_type));
	};


	class mock_statement : public cpp_odbc::statement {
	public:
		mock_statement();
		~mock_statement();
		MOCK_CONST_METHOD1( do_get_integer_attribute, long(SQLINTEGER));
		MOCK_CONST_METHOD2( do_set_attribute, void(SQLINTEGER, long));
		MOCK_CONST_METHOD2( do_set_attribute, void(SQLINTEGER, SQLULEN *));
		MOCK_CONST_METHOD1( do_execute, void(std::string const &));
		MOCK_CONST_METHOD1( do_prepare, void(std::string const &));
		MOCK_CONST_METHOD4( do_bind_input_parameter, void(SQLUSMALLINT, SQLSMALLINT, SQLSMALLINT, cpp_odbc::multi_value_buffer &));
		MOCK_CONST_METHOD0( do_unbind_all_parameters, void());
		MOCK_CONST_METHOD0( do_execute_prepared, void());
		MOCK_CONST_METHOD0( do_number_of_columns, short int());
		MOCK_CONST_METHOD0( do_number_of_parameters, short int());
		MOCK_CONST_METHOD3( do_bind_column, void(SQLUSMALLINT, SQLSMALLINT, cpp_odbc::multi_value_buffer &));
		MOCK_CONST_METHOD0( do_unbind_all_columns, void());
		MOCK_CONST_METHOD0( do_fetch_next, bool());
		MOCK_CONST_METHOD0( do_close_cursor, void());
		MOCK_CONST_METHOD2( do_get_integer_column_attribute, long(SQLUSMALLINT, SQLUSMALLINT));
		MOCK_CONST_METHOD2( do_get_string_column_attribute, std::string(SQLUSMALLINT, SQLUSMALLINT));
		MOCK_CONST_METHOD0( do_row_count, SQLLEN());
		MOCK_CONST_METHOD1( do_describe_column, cpp_odbc::column_description(SQLUSMALLINT));
		MOCK_CONST_METHOD1( do_describe_parameter, cpp_odbc::column_description(SQLUSMALLINT));
	};




}



{'fraction_non_alphanumeric': 0.11342426417803302, 'fraction_numerical': 0.014836085187843982, 'mean_word_length': 7.931623931623932, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4899577', 'n_tokens_mistral': 1634, 'n_tokens_neox': 1542, 'n_words': 237}