2 * Copyright 1999, Dmitry Kovalev <mit@openldap.org>, All rights reserved.
4 * Redistribution and use in source and binary forms are permitted only
5 * as authorized by the OpenLDAP Public License. A copy of this
6 * license is available at http://www.OpenLDAP.org/license.html or
7 * in file LICENSE in the top-level directory of the distribution.
15 #include <sys/types.h>
28 AttributeAssertion *ava )
30 Debug( LDAP_DEBUG_TRACE, "==>backsql_compare() - not implemented\n",
42 Debug( LDAP_DEBUG_TRACE, "==>backsql_abandon()\n", 0, 0, 0 );
43 Debug( LDAP_DEBUG_TRACE, "<==backsql_abandon()\n", 0, 0, 0 );
49 * sets the supported operational attributes (if required)
63 backsql_info *bi = (backsql_info*)be->be_private;
64 SQLHDBC dbh = SQL_NULL_HDBC;
68 Debug( LDAP_DEBUG_TRACE, "==>backsql_operational(): entry '%s'\n",
69 e->e_nname.bv_val, 0, 0 );
72 if ( ( opattrs || ad_inlist( slap_schema.si_ad_hasSubordinates, attrs ) )
73 #ifdef SLAP_X_FILTER_HASSUBORDINATES
74 && attr_find( e->e_attrs, slap_schema.si_ad_hasSubordinates ) == NULL
75 #endif /* SLAP_X_FILTER_HASSUBORDINATES */
78 rc = backsql_get_db_conn( be, conn, &dbh );
79 if ( rc != LDAP_SUCCESS ) {
83 rc = backsql_has_children( bi, dbh, &e->e_nname );
86 case LDAP_COMPARE_TRUE:
87 case LDAP_COMPARE_FALSE:
88 *aa = slap_operational_hasSubordinate( rc == LDAP_COMPARE_TRUE );
96 Debug(LDAP_DEBUG_TRACE,
97 "backsql_operational(): "
98 "has_children failed( %d)\n",
108 Debug( LDAP_DEBUG_TRACE, "backsql_operational(): "
109 "could not get connection handle - exiting\n",
111 send_ldap_result( conn, op, rc, "",
112 rc == LDAP_OTHER ? "SQL-backend error" : "",
117 #endif /* SLAPD_SQL */