*
* Copyright 1999-2005 The OpenLDAP Foundation.
* Portions Copyright 1999 Dmitry Kovalev.
+ * Portions Copyright 2002 Pierangelo Masarati.
* Portions Copyright 2004 Mark Adamson.
* All rights reserved.
*
*/
/* ACKNOWLEDGEMENTS:
* This work was initially developed by Dmitry Kovalev for inclusion
- * by OpenLDAP Software.
+ * by OpenLDAP Software. Additional significant contributors include
+ * Pierangelo Masarati and Mark Adamson.
+
*/
#include "portable.h"
*
* Copyright 1999-2005 The OpenLDAP Foundation.
* Portions Copyright 1999 Dmitry Kovalev.
+ * Portions Copyright 2004 Pierangelo Masarati.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
*/
/* ACKNOWLEDGEMENTS:
* This work was initially developed by Dmitry Kovalev for inclusion
- * by OpenLDAP Software.
+ * by OpenLDAP Software. Additional significant contributors include
+ * Pierangelo Masarati.
*/
#include "portable.h"
/* ACKNOWLEDGEMENTS:
* This work was initially developed by Dmitry Kovalev for inclusion
* by OpenLDAP Software. Additional significant contributors include
- * Pierangelo Mararati and Mark Adamson.
+ * Pierangelo Masarati and Mark Adamson.
*/
/*
* The following changes have been addressed:
* BACKSQL_REALLOC_STMT from modify.c (a more recent unixODBC lib?)
*/
/*
- * Improvements submitted by (ITS#)
+ * Improvements submitted by (ITS#3432)
*
* 1. id_query.patch applied (with changes)
* 2. shortcut.patch applied (reworked)
#ifndef __BACKSQL_H__
#define __BACKSQL_H__
-#include "sql-types.h"
+/* former sql-types.h */
+#include <sql.h>
+#include <sqlext.h>
+
+typedef struct {
+ SWORD ncols;
+ BerVarray col_names;
+ UDWORD *col_prec;
+ char **cols;
+ SQLINTEGER *value_len;
+} BACKSQL_ROW_NTS;
/*
* Better use the standard length of 8192 (as of slap.h)?
*
* Copyright 1999-2005 The OpenLDAP Foundation.
* Portions Copyright 1999 Dmitry Kovalev.
+ * Portions Copyright 2002 Pierangelo Masarati.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
*/
/* ACKNOWLEDGEMENTS:
* This work was initially developed by Dmitry Kovalev for inclusion
- * by OpenLDAP Software.
+ * by OpenLDAP Software. Additional significant contributors include
+ * Pierangelo Masarati.
*/
#include "portable.h"
*
* Copyright 1999-2005 The OpenLDAP Foundation.
* Portions Copyright 1999 Dmitry Kovalev.
+ * Portions Copyright 2002 Pierangelo Masarati.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
*/
/* ACKNOWLEDGEMENTS:
* This work was initially developed by Dmitry Kovalev for inclusion
- * by OpenLDAP Software.
+ * by OpenLDAP Software. Additional significant contributors include
+ * Pierangelo Masarati.
*/
#include "portable.h"
*
* Copyright 1999-2005 The OpenLDAP Foundation.
* Portions Copyright 1999 Dmitry Kovalev.
+ * Portions Copyright 2002 Pierangelo Masarati.
* Portions Copyright 2004 Mark Adamson.
* All rights reserved.
*
*/
/* ACKNOWLEDGEMENTS:
* This work was initially developed by Dmitry Kovalev for inclusion
- * by OpenLDAP Software.
+ * by OpenLDAP Software. Additional significant contributors include
+ * Pierangelo Masarati.
*/
#include "portable.h"
*
* Copyright 1999-2005 The OpenLDAP Foundation.
* Portions Copyright 1999 Dmitry Kovalev.
+ * Portions Copyright 2002 Pierangelo Masarati.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
*/
/* ACKNOWLEDGEMENTS:
* This work was initially developed by Dmitry Kovalev for inclusion
- * by OpenLDAP Software.
+ * by OpenLDAP Software. Additional significant contributors include
+ * Pierangelo Masarati.
*/
#include "portable.h"
*
* Copyright 1999-2005 The OpenLDAP Foundation.
* Portions Copyright 1999 Dmitry Kovalev.
+ * Portions Copyright 2002 Pierangelo Masarati.
* Portions Copyright 2004 Mark Adamson.
* All rights reserved.
*
*/
/* ACKNOWLEDGEMENTS:
* This work was initially developed by Dmitry Kovalev for inclusion
- * by OpenLDAP Software.
+ * by OpenLDAP Software. Additional significant contributors include
+ * Pierangelo Masarati and Mark Adamson.
*/
#include "portable.h"
*
* Copyright 1999-2005 The OpenLDAP Foundation.
* Portions Copyright 1999 Dmitry Kovalev.
+ * Portions Copyright 2002 Pierangelo Masarati.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
*/
/* ACKNOWLEDGEMENTS:
* This work was initially developed by Dmitry Kovalev for inclusion
- * by OpenLDAP Software.
+ * by OpenLDAP Software. Additional significant contributors include
+ * Pierangelo Masarati.
*/
#include "portable.h"
*
* Copyright 1999-2005 The OpenLDAP Foundation.
* Portions Copyright 1999 Dmitry Kovalev.
+ * Portions Copyright 2002 Pierangelo Masarati.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
*/
/* ACKNOWLEDGEMENTS:
* This work was initially developed by Dmitry Kovalev for inclusion
- * by OpenLDAP Software.
+ * by OpenLDAP Software. Additional significant contributors include
+ * Pierangelo Masarati.
*/
#include "portable.h"
*
* Copyright 1999-2005 The OpenLDAP Foundation.
* Portions Copyright 1999 Dmitry Kovalev.
+ * Portions Copyright 2002 Pierangelo Masarati.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
*/
/* ACKNOWLEDGEMENTS:
* This work was initially developed by Dmitry Kovalev for inclusion
- * by OpenLDAP Software.
+ * by OpenLDAP Software. Additional significant contributors include
+ * Pierangelo Masarati.
*/
#include "portable.h"
*
* Copyright 1999-2005 The OpenLDAP Foundation.
* Portions Copyright 1999 Dmitry Kovalev.
+ * Portions Copyright 2002 Pierangelo Masarati.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
*/
/* ACKNOWLEDGEMENTS:
* This work was initially developed by Dmitry Kovalev for inclusion
- * by OpenLDAP Software.
+ * by OpenLDAP Software. Additional significant contributors include
+ * Pierangelo Masarati.
*/
#include "portable.h"
/* ACKNOWLEDGEMENTS:
* This work was initially developed by Dmitry Kovalev for inclusion
* by OpenLDAP Software. Additional significant contributors include
- * Pierangelo Mararati
+ * Pierangelo Masarati
*/
/*
#define PROTO_SQL_H
#include "back-sql.h"
-#include "sql-types.h"
/*
* add.c
*
* Copyright 1999-2005 The OpenLDAP Foundation.
* Portions Copyright 1999 Dmitry Kovalev.
+ * Portions Copyright 2002 Pierangelo Masarati.
* Portions Copyright 2004 Mark Adamson.
* All rights reserved.
*
*/
/* ACKNOWLEDGEMENTS:
* This work was initially developed by Dmitry Kovalev for inclusion
- * by OpenLDAP Software.
+ * by OpenLDAP Software. Additional significant contributors include
+ * Pierangelo Masarati and Mark Adamson.
*/
#include "portable.h"
+++ /dev/null
-/* $OpenLDAP$ */
-/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
- *
- * Copyright 1999-2005 The OpenLDAP Foundation.
- * Portions Copyright 1999 Dmitry Kovalev.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted only as authorized by the OpenLDAP
- * Public License.
- *
- * A copy of this license is available in the file LICENSE in the
- * top-level directory of the distribution or, alternatively, at
- * <http://www.OpenLDAP.org/license.html>.
- */
-/* ACKNOWLEDGEMENTS:
- * This work was initially developed by Dmitry Kovalev for inclusion
- * by OpenLDAP Software.
- */
-
-#ifndef __BACKSQL_SCHEMA_MAP_H__
-#define __BACKSQL_SCHEMA_MAP_H__
-
-typedef struct backsql_oc_map_rec {
- /*
- * Structure of corresponding LDAP objectClass definition
- */
- ObjectClass *bom_oc;
-#define BACKSQL_OC_NAME(ocmap) ((ocmap)->bom_oc->soc_cname.bv_val)
-
- struct berval bom_keytbl;
- struct berval bom_keycol;
- /* expected to return keyval of newly created entry */
- char *bom_create_proc;
- /* in case create_proc does not return the keyval of the newly
- * created row */
- char *bom_create_keyval;
- /* supposed to expect keyval as parameter and delete
- * all the attributes as well */
- char *bom_delete_proc;
- /* flags whether delete_proc is a function (whether back-sql
- * should bind first parameter as output for return code) */
- int bom_expect_return;
- unsigned long bom_id;
- Avlnode *bom_attrs;
-} backsql_oc_map_rec;
-
-typedef struct backsql_at_map_rec {
- /* Description of corresponding LDAP attribute type */
- AttributeDescription *bam_ad;
- /* ObjectClass if bam_ad is objectClass */
- ObjectClass *bam_oc;
-
- struct berval bam_from_tbls;
- struct berval bam_join_where;
- struct berval bam_sel_expr;
-
- /* TimesTen, or, if a uppercase function is defined,
- * an uppercased version of bam_sel_expr */
- struct berval bam_sel_expr_u;
-
- /* supposed to expect 2 binded values: entry keyval
- * and attr. value to add, like "add_name(?,?,?)" */
- char *bam_add_proc;
- /* supposed to expect 2 binded values: entry keyval
- * and attr. value to delete */
- char *bam_delete_proc;
- /* for optimization purposes attribute load query
- * is preconstructed from parts on schemamap load time */
- char *bam_query;
- /* following flags are bitmasks (first bit used for add_proc,
- * second - for delete_proc) */
- /* order of parameters for procedures above;
- * 1 means "data then keyval", 0 means "keyval then data" */
- int bam_param_order;
- /* flags whether one or more of procedures is a function
- * (whether back-sql should bind first parameter as output
- * for return code) */
- int bam_expect_return;
-
- /* next mapping for attribute */
- struct backsql_at_map_rec *bam_next;
-} backsql_at_map_rec;
-
-#define BACKSQL_AT_MAP_REC_INIT { NULL, NULL, BER_BVC(""), BER_BVC(""), BER_BVNULL, BER_BVNULL, NULL, NULL, NULL, 0, 0, NULL }
-
-/* define to uppercase filters only if the matching rule requires it
- * (currently broken) */
-/* #define BACKSQL_UPPERCASE_FILTER */
-#define BACKSQL_AT_CANUPPERCASE(at) ((at)->bam_sel_expr_u.bv_val)
-
-/* defines to support bitmasks above */
-#define BACKSQL_ADD 0x1
-#define BACKSQL_DEL 0x2
-
-#define BACKSQL_IS_ADD(x) ( BACKSQL_ADD & (x) )
-#define BACKSQL_IS_DEL(x) ( BACKSQL_DEL & (x) )
-
-#define BACKSQL_NCMP(v1,v2) ber_bvcmp((v1),(v2))
-
-int backsql_load_schema_map( backsql_info *si, SQLHDBC dbh );
-/* Deprecated */
-backsql_oc_map_rec *backsql_name2oc( backsql_info *si, struct berval *oc_name );
-backsql_oc_map_rec *backsql_oc2oc( backsql_info *si, ObjectClass *oc );
-backsql_oc_map_rec *backsql_id2oc( backsql_info *si, unsigned long id );
-/* Deprecated */
-backsql_at_map_rec *backsql_name2at( backsql_oc_map_rec *objclass,
- struct berval *at_name );
-backsql_at_map_rec *backsql_ad2at( backsql_oc_map_rec *objclass,
- AttributeDescription *ad );
-int backsql_supad2at( backsql_oc_map_rec *objclass,
- AttributeDescription *supad, backsql_at_map_rec ***pret );
-int backsql_destroy_schema_map( backsql_info *si );
-
-#endif /* __BACKSQL_SCHEMA_MAP_H__ */
-
*
* Copyright 1999-2005 The OpenLDAP Foundation.
* Portions Copyright 1999 Dmitry Kovalev.
+ * Portions Copyright 2002 Pierangelo Masarati.
* Portions Copyright 2004 Mark Adamson.
* All rights reserved.
*
*/
/* ACKNOWLEDGEMENTS:
* This work was initially developed by Dmitry Kovalev for inclusion
- * by OpenLDAP Software.
+ * by OpenLDAP Software. Additional significant contributors include
+ * Pierangelo Masarati and Mark Adamson.
*/
#include "portable.h"
+++ /dev/null
-/* $OpenLDAP$ */
-/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
- *
- * Copyright 1999-2005 The OpenLDAP Foundation.
- * Portions Copyright 1999 Dmitry Kovalev.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted only as authorized by the OpenLDAP
- * Public License.
- *
- * A copy of this license is available in the file LICENSE in the
- * top-level directory of the distribution or, alternatively, at
- * <http://www.OpenLDAP.org/license.html>.
- */
-/* ACKNOWLEDGEMENTS:
- * This work was initially developed by Dmitry Kovalev for inclusion
- * by OpenLDAP Software.
- */
-#ifndef __BACKSQL_SQL_TYPES_H__
-#define __BACKSQL_SQL_TYPES_H__
-
-#include <sql.h>
-#include <sqlext.h>
-
-typedef struct {
- SWORD ncols;
- BerVarray col_names;
- UDWORD *col_prec;
- char **cols;
- SQLINTEGER *value_len;
-} BACKSQL_ROW_NTS;
-
-#endif /* __BACKSQL_SQL_TYPES_H__ */
-
*
* Copyright 1999-2005 The OpenLDAP Foundation.
* Portions Copyright 1999 Dmitry Kovalev.
+ * Portions Copyright 2002 Pierangelo Masarati.
* Portions Copyright 2004 Mark Adamson.
* All rights reserved.
*
*/
/* ACKNOWLEDGEMENTS:
* This work was initially developed by Dmitry Kovalev for inclusion
- * by OpenLDAP Software.
+ * by OpenLDAP Software. Additional significant contributors include
+ * Pierangelo Masarati and Mark Adamson.
*/
#include "portable.h"
*
* Copyright 1999-2005 The OpenLDAP Foundation.
* Portions Copyright 1999 Dmitry Kovalev.
+ * Portions Copyright 2002 Pierangelo Masarati.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
*/
/* ACKNOWLEDGEMENTS:
* This work was initially developed by Dmitry Kovalev for inclusion
- * by OpenLDAP Software.
+ * by OpenLDAP Software. Additional significant contributors include
+ * Pierangelo Masarati.
*/
#include "portable.h"