Skip to content

Commit

Permalink
lib/srdb1: typo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dilyanpalauzov authored and miconda committed Jan 26, 2023
1 parent 49c1ae2 commit 7af3e9c
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 27 deletions.
14 changes: 7 additions & 7 deletions src/lib/srdb1/db.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ typedef int (*db_use_table_f)(db1_con_t* _h, const str * _t);
/**
* \brief Initialize database connection and obtain the connection handle.
*
* This function initialize the database API and open a new database
* This function initializes the database API and opens a new database
* connection. This function must be called after bind_dbmod but before any
* other database API function is called.
*
Expand All @@ -90,7 +90,7 @@ typedef db1_con_t* (*db_init_f) (const str* _sqlurl);
/**
* \brief Initialize database connection and obtain the connection handle.
*
* This function initialize the database API and open a new database
* This function initializes the database API and opens a new database
* connection. This function must be called after bind_dbmod but before any
* other database API function is called.
*
Expand Down Expand Up @@ -129,7 +129,7 @@ typedef void (*db_close_f) (db1_con_t* _h);
* If _k and _v parameters are NULL and _n is zero, you will get the whole table.
*
* if _c is NULL and _nc is zero, you will get all table columns in the result.
* _r will point to a dynamically allocated structure, it is neccessary to call
* _r will point to a dynamically allocated structure, it is necessary to call
* db_free_result function once you are finished with the result.
*
* If _op is 0, equal (=) will be used for all key-value pairs comparisons.
Expand Down Expand Up @@ -159,7 +159,7 @@ typedef int (*db_query_f) (const db1_con_t* _h, const db_key_t* _k, const db_op_
* \brief Gets a partial result set, fetch rows from a result
*
* Gets a partial result set, fetch a number of rows from a database result.
* This function initialize the given result structure on the first run, and
* This function initializes the given result structure on the first run, and
* fetches the nrows number of rows. On subsequenting runs, it uses the
* existing result and fetches more rows, until it reaches the end of the
* result set. Because of this the result needs to be null in the first
Expand Down Expand Up @@ -212,7 +212,7 @@ typedef int (*db_raw_query_async_f) (const db1_con_t* _h, const str* _s);
* \brief Free a result allocated by db_query.
*
* This function frees all memory allocated previously in db_query. Its
* neccessary to call this function on a db1_res_t structure if you don't need the
* necessary to call this function on a db1_res_t structure if you don't need the
* structure anymore. You must call this function before you call db_query again!
* \param _h database connection handle
* \param _r pointer to db1_res_t structure to destroy
Expand Down Expand Up @@ -419,7 +419,7 @@ typedef struct db_func {
db_insert_update_f insert_update; /* Insert into table, update on duplicate key */
db_insert_delayed_f insert_delayed; /* Insert delayed into table */
db_insert_async_f insert_async; /* Insert async into table */
db_affected_rows_f affected_rows; /* Numer of affected rows for last query */
db_affected_rows_f affected_rows; /* Number of affected rows for last query */
db_start_transaction_f start_transaction; /* Start a single transaction consisting of multiple queries */
db_end_transaction_f end_transaction; /* End a transaction */
db_abort_transaction_f abort_transaction; /* Abort a transaction */
Expand Down Expand Up @@ -482,7 +482,7 @@ db1_con_t* db_do_init2(const str* url, void* (*new_connection)(), db_pooling_t p
* This helper method does some work for the closing of a database
* connection. No function should be called after this
* \param _h database connection handle
* \param (*free_connection) Pointer to the db specifc free_connection method
* \param (*free_connection) Pointer to the db specific free_connection method
*/
void db_do_close(db1_con_t* _h, void (*free_connection)());

Expand Down
2 changes: 1 addition & 1 deletion src/lib/srdb1/db_query.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ static int db_fetch_query_internal(db_func_t *dbf, int frows,
} else {
if(_query(_h, _k, _op, _v, _c, _n, _nc, _o, _r) < 0)
{
LM_ERR("unable to do full db querry\n");
LM_ERR("unable to do full db query\n");
goto error;
}
}
Expand Down
20 changes: 10 additions & 10 deletions src/lib/srdb1/db_query.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
*
* This method evaluates the actual arguments for the database query and
* setups the string that is used for the query in the db module.
* Then its submit the query and stores the result if necessary. It uses for
* Then it submits the query and stores the result if necessary. It uses for
* its work the implementation in the concrete database module.
*
* \param _h structure representing database connection
Expand All @@ -56,7 +56,7 @@
* \param _v values of the keys that must match
* \param _c column names that should be returned
* \param _n number of key/value pairs that are compared, if zero then no comparison is done
* \param _nc number of colums that should be returned
* \param _nc number of columns that should be returned
* \param _o order by the specificied column, optional
* \param _r the result that is returned, set to NULL if you want to use fetch_result later
* \param (*val2str) function pointer to the db specific val conversion function
Expand All @@ -75,7 +75,7 @@ int db_do_query(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _op,
*
* This method evaluates the actual arguments for the database query and
* setups the string that is used for the query in the db module.
* Then its submit the query and stores the result if necessary. It uses for
* Then it submits the query and stores the result if necessary. It uses for
* its work the implementation in the concrete database module.
*
* \param _h structure representing database connection
Expand All @@ -84,7 +84,7 @@ int db_do_query(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _op,
* \param _v values of the keys that must match
* \param _c column names that should be returned
* \param _n number of key/value pairs that are compared, if zero then no comparison is done
* \param _nc number of colums that should be returned
* \param _nc number of columns that should be returned
* \param _o order by the specificied column, optional
* \param _r the result that is returned, set to NULL if you want to use fetch_result later
* \param (*val2str) function pointer to the db specific val conversion function
Expand All @@ -103,7 +103,7 @@ int db_do_query_lock(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _op
*
* This method evaluates the actual arguments for the database raw query
* and setups the string that is used for the query in the db module.
* Then its submit the query and stores the result if necessary.
* Then it submits the query and stores the result if necessary.
* It uses for its work the implementation in the concrete database module.
*
* \param _h structure representing database connection
Expand All @@ -123,7 +123,7 @@ int db_do_raw_query(const db1_con_t* _h, const str* _s, db1_res_t** _r,
*
* This method evaluates the actual arguments for the database operation
* and setups the string that is used for the insert operation in the db
* module. Then its submit the query for the operation. It uses for its work
* module. Then it submits the query for the operation. It uses for its work
* the implementation in the concrete database module.
*
* \param _h structure representing database connection
Expand All @@ -144,7 +144,7 @@ int db_do_insert(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _v,
*
* This method evaluates the actual arguments for the database operation
* and setups the string that is used for the delete operation in the db
* module. Then its submit the query for the operation. It uses for its work
* module. Then it submits the query for the operation. It uses for its work
* the implementation in the concrete database module.
*
* \param _h structure representing database connection
Expand All @@ -167,7 +167,7 @@ int db_do_delete(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
*
* This method evaluates the actual arguments for the database operation
* and setups the string that is used for the update operation in the db
* module. Then its submit the query for the operation. It uses for its work
* module. Then it submits the query for the operation. It uses for its work
* the implementation in the concrete database module.
*
* \param _h structure representing database connection
Expand All @@ -193,7 +193,7 @@ int db_do_update(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
*
* This helper method evaluates the actual arguments for the database operation
* and setups the string that is used for the replace operation in the db
* module. Then its submit the query for the operation. It uses for its work the
* module. Then it submits the query for the operation. It uses for its work the
* implementation in the concrete database module.
*
* \param _h structure representing database connection
Expand All @@ -214,7 +214,7 @@ int db_do_replace(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _v,
*
* This method evaluates the actual arguments for the database operation
* and setups the string that is used for the insert delayed operation in the db
* module. Then its submit the query for the operation. It uses for its work
* module. Then it submits the query for the operation. It uses for its work
* the implementation in the concrete database module.
*
* \param _h structure representing database connection
Expand Down
2 changes: 1 addition & 1 deletion src/lib/srdb1/db_res.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct db_row;
* This type represents a result returned by db_query function (see below). The
* result can consist of zero or more rows (see db_row_t description).
*
* Note: A variable of type db1_res_t returned by db_query function uses dynamicaly
* Note: A variable of type db1_res_t returned by db_query function uses dynamically
* allocated memory, don't forget to call db_free_result if you don't need the
* variable anymore. You will encounter memory leaks if you fail to do this!
*
Expand Down
4 changes: 2 additions & 2 deletions src/lib/srdb1/db_row.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ int db_free_row(db_row_t* _r)
}

/*
* Loop thru each columm, then check to determine if the storage pointed to
* Loop thru each column, then check to determine if the storage pointed to
* by db_val_t structure must be freed. This is required for all data types
* which use a pointer to a buffer like DB1_STRING, DB1_STR and DB1_BLOB and
* the database module copied them during the assignment.
Expand Down Expand Up @@ -88,7 +88,7 @@ int db_free_row(db_row_t* _r)
break;
}
}
/* now as we freed all, set number of colums to zero again */
/* now as we freed all, set number of columns to zero again */
ROW_N(_r) = 0;

if (ROW_VALUES(_r)) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/srdb1/db_row.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ typedef struct db_row {

/** Return the columns in the row */
#define ROW_VALUES(rw) ((rw)->values)
/** Return the number of colums */
/** Return the number of columns */
#define ROW_N(rw) ((rw)->n)

/**
Expand Down
4 changes: 2 additions & 2 deletions src/lib/srdb1/db_val.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* Convert a str to a db value, copy strings if _cpy is not zero.
* Copying is not necessary if the result from the database client library
* is freed after the result inside the server is processed. If the result
* is freed earlier, e.g. because its saved inside some temporary storage,
* is freed earlier, e.g. because it is saved inside some temporary storage,
* then it must be copied in order to be use it reliable.
*
* \param _t destination value type
Expand All @@ -50,7 +50,7 @@ int db_str2val(const db_type_t _t, db_val_t* _v, const char* _s, const int _l,
LM_ERR("invalid parameter value\n");
return -1;
}
/* A NULL string is a SQL NULL value, otherwise its an empty value */
/* A NULL string is a SQL NULL value, otherwise it is an empty value */
if (!_s) {
LM_DBG("converting NULL value\n");
memset(_v, 0, sizeof(db_val_t));
Expand Down
2 changes: 1 addition & 1 deletion src/lib/srdb1/db_val.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ typedef enum {

/**
* This structure represents a value in the database. Several datatypes are
* recognized and converted by the database API. These datatypes are automaticaly
* recognized and converted by the database API. These datatypes are automatically
* recognized, converted from internal database representation and stored in the
* variable of corresponding type.
*
Expand Down
2 changes: 1 addition & 1 deletion src/lib/srdb1/schema/carrierroute.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
If all probabilities for a given prefix, tree and domain don't add to 100%,
the prefix values will be adjusted according the given prob values. E.g. if
three hosts with prob values of 0.5, 0.5 and 0.4 are defined, the resulting
probabilities are 35.714, 35.714 and 28.571%. But its better to choose meaningful
probabilities are 35.714, 35.714 and 28.571%. But it is better to choose meaningful
values in the first place because of clarity.
</para></description>
</column>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/srdb1/schema/template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

<index>
<name>blub</name>
<!--<primary/> -> PRIMARY KEY over more than one colums -->
<!--<primary/> -> PRIMARY KEY over more than one column -->
<colref linkend="bla"/> <!-- link to the node with these id -->
<colref linkend="id"/>
</index>
Expand Down

0 comments on commit 7af3e9c

Please sign in to comment.