sqlsync_compare_results.h File Reference

#include "data_types/sqlsync_data_misc.h"
#include "data_types/sqlsync_data_string.h"
#include "data_types/sqlsync_data_vector_misc.h"
#include "data_types/sqlsync_data_grid.h"

Data Structures

struct  c_cmp_results

Typedefs

typedef c_cmp_resultsc_cmp_ptr

Functions

c_cmp_ptr c_cmp_init (sqlsync_server_type type)
SQLSYNC_RETURN c_cmp_set_primary_keys (c_cmp_ptr container, c_vector_columns_ptr primary_keys, c_vector_int32_ptr primary_keys_pos)
SQLSYNC_RETURN c_cmp_set_name (c_cmp_ptr container, c_string_elem_ptr name)
SQLSYNC_RETURN c_cmp_add_columns (c_cmp_ptr container, c_vector_columns_ptr columns)
SQLSYNC_RETURN c_cmp_increment_equals_count (c_cmp_ptr container)
SQLSYNC_RETURN c_cmp_add_rows_diff (c_cmp_ptr container, c_grid_data_ptr row_src, c_grid_data_ptr row_dst)
SQLSYNC_RETURN c_cmp_add_row_miss (c_cmp_ptr container, c_grid_data_ptr row_miss)
SQLSYNC_RETURN c_cmp_add_row_add (c_cmp_ptr container, c_grid_data_ptr row_add)
SQLSYNC_RETURN c_cmp_clear (c_cmp_ptr container)
SQLSYNC_RETURN c_cmp_destroy (c_cmp_ptr *container)
SQLSYNC_RETURN c_cmp_destroy_all (c_cmp_ptr **container, uint32 size)
SQLSYNC_RETURN c_cmp_create_synchronization_queries (c_cmp_ptr container, SQLSYNC_RETURN save)
SQLSYNC_RETURN sqlsync_query_create_INSERT_queries (c_cmp_ptr container, SQLSYNC_RETURN save)
SQLSYNC_RETURN sqlsync_query_create_DELETE_queries (c_cmp_ptr container, SQLSYNC_RETURN save)
SQLSYNC_RETURN sqlsync_query_create_UPDATE_queries (c_cmp_ptr container, SQLSYNC_RETURN save)
void c_cmp_print_all_elems (c_cmp_ptr container)

Typedef Documentation

typedef c_cmp_results* c_cmp_ptr


Function Documentation

SQLSYNC_RETURN c_cmp_add_columns ( c_cmp_ptr  container,
c_vector_columns_ptr  columns 
)

Function copies list of columns

Parameters:
container Pointer to the container
columns List of columns stored in c_data_ptr (see c_column_elem or sqlsync_get_columns)
See also:
c_column_elem, sqlsync_get_columns
Returns:
SQLSYNC_RETURN Returns SQLSYNC_FAILED_NULL if something went wrong otherwise SQLSYNC_SUCCESS is returned

SQLSYNC_RETURN c_cmp_add_row_add ( c_cmp_ptr  container,
c_grid_data_ptr  row_add 
)

Function copies row that is additional in destination table

Parameters:
container Pointer to the container
row_add Additional row
Returns:
SQLSYNC_RETURN Returns SQLSYNC_FAILED_NULL if something went wrong otherwise SQLSYNC_SUCCESS is returned

SQLSYNC_RETURN c_cmp_add_row_miss ( c_cmp_ptr  container,
c_grid_data_ptr  row_miss 
)

Function copies row that is missing in destination table

Parameters:
container Pointer to the container
row_miss Missing row
Returns:
SQLSYNC_RETURN Returns SQLSYNC_FAILED_NULL if something went wrong otherwise SQLSYNC_SUCCESS is returned

SQLSYNC_RETURN c_cmp_add_rows_diff ( c_cmp_ptr  container,
c_grid_data_ptr  row_src,
c_grid_data_ptr  row_dst 
)

Function copies rows that are different

Parameters:
container Pointer to the container
row_src Row from source table
row_dst Row from destination table
Returns:
SQLSYNC_RETURN Returns SQLSYNC_FAILED_NULL if something went wrong otherwise SQLSYNC_SUCCESS is returned

SQLSYNC_RETURN c_cmp_clear ( c_cmp_ptr  container  ) 

Function clears whole internal structure (all rows, columns, names etc are freed

Parameters:
container Pointer to the container
Returns:
SQLSYNC_RETURN Returns SQLSYNC_FAILED_NULL if something went wrong otherwise SQLSYNC_SUCCESS is returned

SQLSYNC_RETURN c_cmp_create_synchronization_queries ( c_cmp_ptr  container,
SQLSYNC_RETURN  save 
)

Function creates queries based on collected data

Parameters:
container Pointer to the container
Returns:
SQLSYNC_RETURN Returns SQLSYNC_SUCCESS

SQLSYNC_RETURN c_cmp_destroy ( c_cmp_ptr container  ) 

Function destroyes container

Parameters:
container Pointer to the container
Returns:
SQLSYNC_RETURN Returns SQLSYNC_FAILED_NULL if something went wrong otherwise SQLSYNC_SUCCESS is returned

SQLSYNC_RETURN c_cmp_destroy_all ( c_cmp_ptr **  container,
uint32  size 
)

Function destroyes array of containers

Parameters:
container Pointer to the array of containers
size Numer of containers in array
Returns:
SQLSYNC_RETURN Returns SQLSYNC_FAILED_NULL if something went wrong otherwise SQLSYNC_SUCCESS is returned

SQLSYNC_RETURN c_cmp_increment_equals_count ( c_cmp_ptr  container  ) 

Increases number of equals rows

Parameters:
container Pointer to the container
Returns:
SQLSYNC_RETURN Returns SQLSYNC_FAILED_NULL if something went wrong otherwise SQLSYNC_SUCCESS is returned

c_cmp_ptr c_cmp_init ( sqlsync_server_type  type  ) 

Function creates structure where results of comparizion will be stored (rows, queries, etc)

Returns:
c_cmp_ptr

void c_cmp_print_all_elems ( c_cmp_ptr  container  ) 

Function prints informations that are stored in container, summary, different, missing, additional rows etc.

Parameters:
container Pointer to the container

SQLSYNC_RETURN c_cmp_set_name ( c_cmp_ptr  container,
c_string_elem_ptr  name 
)

Function sets table name

Parameters:
container Pointer to the container
name Table name (copied to the internal structure)
Returns:
SQLSYNC_RETURN Returns SQLSYNC_FAILED_NULL if pointer were null or SQLSYNC_SUCCESS otherwise

SQLSYNC_RETURN c_cmp_set_primary_keys ( c_cmp_ptr  container,
c_vector_columns_ptr  primary_keys,
c_vector_int32_ptr  primary_keys_pos 
)

SQLSYNC_RETURN sqlsync_query_create_DELETE_queries ( c_cmp_ptr  container,
SQLSYNC_RETURN  save 
)

SQLSYNC_RETURN sqlsync_query_create_INSERT_queries ( c_cmp_ptr  container,
SQLSYNC_RETURN  save 
)

SQLSYNC_RETURN sqlsync_query_create_UPDATE_queries ( c_cmp_ptr  container,
SQLSYNC_RETURN  save 
)


Generated on Tue Apr 15 15:33:01 2008 for sqlsync by  doxygen 1.5.4