sqlsync.h File Reference

#include "sqlsync_def.h"
#include "data_types/sqlsync_data_string.h"
#include "data_types/sqlsync_data_misc.h"

Functions

sqlsync_info_ptr sqlsync_init (int8 *error)
int8 sqlsync_destroy (sqlsync_info_ptr info_ptr)
void sqlsync_ignore_case_sensitive (sqlsync_info_ptr info_ptr, int8 ignore)
int8 sqlsync_connect (sqlsync_info_ptr info_ptr, sqlsync_server nr_server, c_string_elem_ptr dsn, c_string_elem_ptr user, c_string_elem_ptr password)
int8 sqlsync_show_available_dsns ()
void sqlsync_print_error (sqlsync_info_ptr info_ptr, sqlsync_server nr_server)
uint32 sqlsync_compare_databases (sqlsync_info_ptr info_ptr, c_vector_strings_ptr tables, c_grid_columns_ptr tables_columns, int8 show_summary, int8 show_queries, int8 run_queries)
int8 sqlsync_run_query_file (sqlsync_info_ptrinfo_ptr, sqlsync_server nr_server, c_string_elem_ptr name)
void sqlsync_parse_tables_columns (c_string_elem_ptr tables_columns, c_vector_strings_ptr *tables, c_grid_columns_ptr *columns)

Function Documentation

uint32 sqlsync_compare_databases ( sqlsync_info_ptr  info_ptr,
c_vector_strings_ptr  tables,
c_grid_columns_ptr  tables_columns,
int8  show_summary,
int8  show_queries,
int8  run_queries 
)

int8 sqlsync_connect ( sqlsync_info_ptr  info_ptr,
sqlsync_server  nr_server,
c_string_elem_ptr  dsn,
c_string_elem_ptr  user,
c_string_elem_ptr  password 
)

Connects to specified server

Parameters:
info Pointer to the main structure
nr_server Which server (SRC or DST)
dsn DSN name
user User name
password Password
Returns:
Returns SQLSYNC_FAILED_NULL if pointer were null,if something went wrong in connection phase SQLSYNC_FAILED_CONNECT is returned otherwise SQLSYNC_SUCCESS is returned

int8 sqlsync_destroy ( sqlsync_info_ptr  info_ptr  ) 

This function finalize all internal data to work with library. Function must be executed after any other from this library.

Parameters:
info Pointer to the structure that will be destroyed in that function, internal handles will be destroyed
Returns:
Returns SQLSYNC_FAILED_DESTROY if something went wrong otherwise SQLSYNC_SUCCESS is returned

void sqlsync_ignore_case_sensitive ( sqlsync_info_ptr  info_ptr,
int8  ignore 
)

This function sets or clear case sensitivity when comparing table or column names

sqlsync_info_ptr sqlsync_init ( int8 error  ) 

This function initalizes all internal data to work with library. Function must be executed before any other from this library.

Returns:
Pointer to the structure that will be used by sqlsync library

void sqlsync_parse_tables_columns ( c_string_elem_ptr  tables_columns,
c_vector_strings_ptr *  tables,
c_grid_columns_ptr *  columns 
)

void sqlsync_print_error ( sqlsync_info_ptr  info_ptr,
sqlsync_server  nr_server 
)

Shows error message Function prints message to stderr

Parameters:
info Pointer to the main structure

int8 sqlsync_run_query_file ( sqlsync_info_ptrinfo_ptr  ,
sqlsync_server  nr_server,
c_string_elem_ptr  name 
)

Executes SQL queries from file

Parameters:
info Pointer to main structure
nr_server Which server (SRC or DST) should receive query
name Filename with queries to run
name_size Size of filename
Returns:
Returns SQLSYNC_FAILED_QUERY if something went wrong if pointers are null function returns SQLSYNC_FAILED_NULL otherwise SQLSYNC_SUCCESS

int8 sqlsync_show_available_dsns (  ) 

Function shows available DSNs

Returns:
SQLSYNC_RETURN Returns SQLSYNC_FAILED if something went wrong otherwise SQLSYNC_SUCCESS


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