MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / _query_id_start

Function _query_id_start

modules/sqlops/sqlops_db.c:635–656  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

633
634static str _query_id = {NULL,0};
635static inline str* _query_id_start( str *table, str *order)
636{
637 if (_query_id.s==NULL) {
638 if ( !query_id_max_len ||
639 (_query_id.s=pkg_malloc(query_id_max_len ))==NULL )
640 return NULL;
641 }
642 _query_id.len = 0;
643
644 memcpy( _query_id.s + _query_id.len, table->s, table->len);
645 _query_id.len += table->len;
646
647 if (order) {
648 *(_query_id.s + _query_id.len++) = '|';
649 memcpy( _query_id.s + _query_id.len, order->s, order->len);
650 _query_id.len += order->len;
651 }
652
653 *(_query_id.s + _query_id.len++) = '^';
654
655 return &_query_id;
656}
657
658static inline str* _query_id_add_cols( db_key_t *_c, int _nc)
659{

Callers 5

sql_api_selectFunction · 0.85
sql_api_updateFunction · 0.85
sql_api_insertFunction · 0.85
sql_api_deleteFunction · 0.85
sql_api_replaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected