Skip to content

Commit

Permalink
Apply review
Browse files Browse the repository at this point in the history
  • Loading branch information
yitam committed Oct 5, 2018
1 parent f183b2e commit cd89b7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion source/shared/core_sqlsrv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,7 @@ struct sqlsrv_stmt : public sqlsrv_context {
std::vector<param_meta_data> param_descriptions;

// meta data for current result set
std::vector<field_meta_data*, sqlsrv_allocator< field_meta_data* > > current_meta_data;
std::vector<field_meta_data*, sqlsrv_allocator<field_meta_data*>> current_meta_data;

sqlsrv_stmt( _In_ sqlsrv_conn* c, _In_ SQLHANDLE handle, _In_ error_callback e, _In_opt_ void* drv TSRMLS_DC );
virtual ~sqlsrv_stmt( void );
Expand Down
9 changes: 2 additions & 7 deletions source/sqlsrv/stmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ PHP_FUNCTION( sqlsrv_field_metadata )

try {

// get the number of fields in the resultset
// get the number of fields in the resultset and its metadata if not exists
SQLSMALLINT num_cols = get_resultset_meta_data(stmt);

zval result_meta_data;
Expand All @@ -490,8 +490,6 @@ PHP_FUNCTION( sqlsrv_field_metadata )
core::sqlsrv_add_assoc_string(*stmt, &field_array, FieldMetaData::NAME,
reinterpret_cast<char*>(core_meta_data->field_name.get()), 1 TSRMLS_CC);

// core_meta_data->field_name.transferred();

core::sqlsrv_add_assoc_long( *stmt, &field_array, FieldMetaData::TYPE, core_meta_data->field_type TSRMLS_CC );

switch( core_meta_data->field_type ) {
Expand Down Expand Up @@ -530,9 +528,6 @@ PHP_FUNCTION( sqlsrv_field_metadata )

// add this field's meta data to the result set meta data
core::sqlsrv_add_next_index_zval( *stmt, &result_meta_data, &field_array TSRMLS_CC );

// always good to call destructor for allocations done through placement new operator.
// core_meta_data->~field_meta_data();
}

// return our built collection and transfer ownership
Expand Down Expand Up @@ -1823,7 +1818,7 @@ void fetch_fields_common( _Inout_ ss_sqlsrv_stmt* stmt, _In_ zend_long fetch_typ
throw ss::SSException();
}

// get the numer of columns in the result set
// get the numer of columns in the result set and its metadata if not exists
SQLSMALLINT num_cols = get_resultset_meta_data(stmt);

// if this is the first fetch in a new result set, then get the field names and
Expand Down

0 comments on commit cd89b7d

Please sign in to comment.