#if 0 /* needs updating */
#ifdef LDAP_CONTROL_NOOP
LDAP_CONTROL_NOOP,
-#endif
+#endif /* LDAP_CONTROL_NOOP */
#endif
#ifdef LDAP_CONTROL_VALUESRETURNFILTER
LDAP_CONTROL_VALUESRETURNFILTER,
-#endif
+#endif /* LDAP_CONTROL_VALUESRETURNFILTER */
NULL
};
return 0;
}
-
-#if 0
-/*
- * Deprecated
- */
-backsql_at_map_rec *
-backsql_name2at( backsql_oc_map_rec* objclass, struct berval *attr )
-{
- backsql_at_map_rec tmp, *res;
- const char *text = NULL;
-
-#ifdef BACKSQL_TRACE
- Debug( LDAP_DEBUG_TRACE, "==>backsql_name2at(): "
- "searching for attribute '%s' for objectclass '%s'\n",
- attr, BACKSQL_OC_NAME( objclass ), 0 );
-#endif /* BACKSQL_TRACE */
-
- if ( slap_bv2ad( attr, &tmp.bam_ad, &text ) != LDAP_SUCCESS ) {
- return NULL;
- }
-
- res = (backsql_at_map_rec *)avl_find( objclass->bom_attrs, &tmp,
- backsql_cmp_attr );
-
-#ifdef BACKSQL_TRACE
- if ( res != NULL ) {
- Debug( LDAP_DEBUG_TRACE, "<==backsql_name2at(): "
- "found name='%s', sel_expr='%s'\n",
- res->bam_name, res->bam_sel_expr.bv_val, 0 );
- } else {
- Debug( LDAP_DEBUG_TRACE, "<==backsql_name2at(): "
- "not found\n", 0, 0, 0 );
- }
-#endif /* BACKSQL_TRACE */
-
- return res;
-}
-#endif
-
static void
backsql_free_attr( void *v_at )
{
} else {
backsql_strfcat( &bsi->bsi_flt_where, "cblbl",
- '(',
+ '(', /* ) */
&at->bam_sel_expr,
(ber_len_t)sizeof( "='" ) - 1, "='",
filter_value,
if ( at->bam_sel_expr_u.bv_val ) {
backsql_strfcat( &bsi->bsi_flt_where, "cbbc",
- '(',
+ '(', /* ) */
&at->bam_sel_expr_u,
&ordering,
'\'' );
#if 0 /* noop is masked SLAP_CTRL_UPDATE */
if ( op->o_noop ) {
sres = 0;
- } else {
+ } else
#endif
+ {
rs->sr_attrs = op->oq_search.rs_attrs;
rs->sr_entry = entry;
sres = send_search_entry( op, rs );
rs->sr_entry = NULL;
rs->sr_attrs = NULL;
-#if 0
}
-#endif
switch ( sres ) {
case 0:
return SQLPrepare( *sth, query, SQL_NTS );
}
-#if 0
-/*
- * Turned into macros --- see sql-wrap.h
- */
-RETCODE
-backsql_BindParamStr( SQLHSTMT sth, int par_ind, char *str, int maxlen )
-{
- RETCODE rc;
-
- rc = SQLBindParameter( sth, (SQLUSMALLINT)par_ind, SQL_PARAM_INPUT,
- SQL_C_CHAR, SQL_VARCHAR,
- (SQLUINTEGER)maxlen, 0, (SQLPOINTER)str,
- (SQLUINTEGER)maxlen, NULL );
- return rc;
-}
-
-RETCODE
-backsql_BindParamID( SQLHSTMT sth, int par_ind, unsigned long *id )
-{
- return SQLBindParameter( sth, (SQLUSMALLINT)par_ind,
- SQL_PARAM_INPUT, SQL_C_ULONG, SQL_INTEGER,
- 0, 0, (SQLPOINTER)id, 0, (SQLINTEGER*)NULL );
-}
-#endif
-
RETCODE
backsql_BindRowAsStrings( SQLHSTMT sth, BACKSQL_ROW_NTS *row )
{
#if 0
backsql_strcat( &res, " AS ", s, NULL );
- /* oracle doesn't understand AS :( */
+ /* oracle doesn't understand AS :( and other RDBMSes don't need it */
#endif
/* table alias */