/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1999-2005 The OpenLDAP Foundation.
+ * Copyright 1999-2007 The OpenLDAP Foundation.
* Portions Copyright 1999 Dmitry Kovalev.
* Portions Copyright 2002 Pierangelo Mararati.
* All rights reserved.
int matched, int muck );
/* stores in *nchildren the count of children for an entry */
-int backsql_count_children( backsql_info *bi, SQLHDBC dbh,
+int backsql_count_children( Operation *op, SQLHDBC dbh,
struct berval *dn, unsigned long *nchildren );
/* returns LDAP_COMPARE_TRUE/LDAP_COMPARE_FALSE if the entry corresponding
* to DN has/has not children */
-int backsql_has_children( backsql_info *bi, SQLHDBC dbh, struct berval *dn );
+int backsql_has_children( Operation *op, SQLHDBC dbh, struct berval *dn );
/* frees *id and returns next in list */
backsql_entryID *backsql_free_entryID( Operation *op, backsql_entryID *id,
*/
int backsql_init_search( backsql_srch_info *bsi,
- struct berval *nbase, int scope, int slimit, int tlimit,
+ struct berval *nbase, int scope,
time_t stoptime, Filter *filter, SQLHDBC dbh,
Operation *op, SlapReply *rs, AttributeName *attrs,
unsigned flags );
+void backsql_entry_clean( Operation *op, Entry *e );
+
/*
* sql-wrap.h
*/
backsql_BindParamInt( (sth), (par_ind), (io), (id) )
#endif /* ! BACKSQL_ARBITRARY_KEY */
+RETCODE backsql_BindRowAsStrings_x( SQLHSTMT sth, BACKSQL_ROW_NTS *row, void *ctx );
+
RETCODE backsql_BindRowAsStrings( SQLHSTMT sth, BACKSQL_ROW_NTS *row );
+RETCODE backsql_FreeRow_x( BACKSQL_ROW_NTS *row, void *ctx );
+
RETCODE backsql_FreeRow( BACKSQL_ROW_NTS *row );
void backsql_PrintErrors( SQLHENV henv, SQLHDBC hdbc, SQLHSTMT sth, int rc );
+int backsql_conn_destroy( backsql_info *bi );
+
int backsql_init_db_env( backsql_info *si );
int backsql_free_db_env( backsql_info *si );
extern char
backsql_check_dn_ru_query[];
-struct berbuf * backsql_strcat( struct berbuf *dest, ... );
-struct berbuf * backsql_strfcat( struct berbuf *dest, const char *fmt, ... );
+struct berbuf * backsql_strcat_x( struct berbuf *dest, void *memctx, ... );
+struct berbuf * backsql_strfcat_x( struct berbuf *dest, void *memctx, const char *fmt, ... );
int backsql_entry_addattr( Entry *e, AttributeDescription *ad,
struct berval *at_val, void *memctx );
-int backsql_merge_from_clause( struct berbuf *dest_from,
+int backsql_merge_from_clause( backsql_info *bi, struct berbuf *dest_from,
struct berval *src_from );
int backsql_split_pattern( const char *pattern, BerVarray *split_pattern,
extern BI_operational backsql_operational;
extern BI_entry_get_rw backsql_entry_get;
+extern BI_entry_release_rw backsql_entry_release;
extern BI_connection_destroy backsql_connection_destroy;