//--------------------------------------------------------------------------------------------------------------------------------- // File: OdbcConnectionBridge.h // Contents: Create (bridge) operations to be completed on background thread queue // // Copyright Microsoft Corporation and contributors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // // You may obtain a copy of the License at: // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. //--------------------------------------------------------------------------------------------------------------------------------- #pragma once #include namespace mssql { using namespace std; using namespace v8; class OdbcConnection; class OdbcConnectionBridge { public: OdbcConnectionBridge(); ~OdbcConnectionBridge(); Local close(Local callback) const; void collect(void) const ; Local begin_transaction(Local callback) const; Local commit(Local callback) const; Local rollback(Local callback) const; Local query(Local query_id, Local query_object, Local params, Local callback) const; Local query_prepared(Local query_id, Local params, Local callback) const; Local prepare(Local query_id, Local query_object, Local callback) const; Local call_procedure(Local query_id, Local query_object, Local params, Local callback) const; Local unbind_parameters(Local query_id, Local callback) const; Local cancel(Local query_id, Local callback) const ; Local polling_mode(Local query_id, Local mode, Local callback) const; Local read_row(Local query_id, Local callback) const; Local read_next_result(Local query_id, Local callback) const; Local read_column(Local query_id, Local number_rows, Local callback) const; Local open(Local connection_object, Local callback, Local backpointer) const; Local free_statement(Local query_id, Local callback) const; private: shared_ptr connection; }; }