Back to index

openldap  2.4.31
Classes | Defines | Typedefs
back-sql.h File Reference
#include <sql.h>
#include <sqlext.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  BACKSQL_ROW_NTS
struct  backsql_api
struct  backsql_oc_map_rec
struct  backsql_at_map_rec
struct  berbuf
struct  backsql_entryID
struct  backsql_srch_info
struct  backsql_info

Defines

#define BACKSQL_MAX_DN_LEN   255
#define BACKSQL_COUNTQUERY
#define BACKSQL_PRETTY_VALIDATE
#define BACKSQL_C_NUMID   SQL_C_ULONG
#define BACKSQL_IDNUMFMT   "%lu"
#define BACKSQL_STR2ID   lutil_atoulx
#define BACKSQL_SYNCPROV
#define BACKSQL_ALIASING   "AS "
#define BACKSQL_ALIASING_QUOTE   ""
#define BACKSQL_OC_NAME(ocmap)   ((ocmap)->bom_oc->soc_cname.bv_val)
#define BACKSQL_AT_MAP_REC_INIT   { NULL, NULL, BER_BVC(""), BER_BVC(""), BER_BVNULL, BER_BVNULL, NULL, NULL, NULL, 0, 0, NULL }
#define BACKSQL_AT_CANUPPERCASE(at)   ( !BER_BVISNULL( &(at)->bam_sel_expr_u ) )
#define BACKSQL_ADD   0x1
#define BACKSQL_DEL   0x2
#define BACKSQL_IS_ADD(x)   ( ( BACKSQL_ADD & (x) ) == BACKSQL_ADD )
#define BACKSQL_IS_DEL(x)   ( ( BACKSQL_DEL & (x) ) == BACKSQL_DEL )
#define BACKSQL_NCMP(v1, v2)   ber_bvcmp((v1),(v2))
#define BACKSQL_CONCAT
#define BB_NULL   { BER_BVNULL, 0 }
#define BACKSQL_ENTRYID_INIT   { 0, 0, 0, NULL, BER_BVNULL, BER_BVNULL, NULL }
#define BACKSQL_ISF_GET_ID   0x1U
#define BACKSQL_ISF_GET_ENTRY   ( 0x2U | BACKSQL_ISF_GET_ID )
#define BACKSQL_ISF_GET_OC   ( 0x4U | BACKSQL_ISF_GET_ID )
#define BACKSQL_ISF_MATCHED   0x8U
#define BACKSQL_IS_GET_ID(f)   ( ( (f) & BACKSQL_ISF_GET_ID ) == BACKSQL_ISF_GET_ID )
#define BACKSQL_IS_GET_ENTRY(f)   ( ( (f) & BACKSQL_ISF_GET_ENTRY ) == BACKSQL_ISF_GET_ENTRY )
#define BACKSQL_IS_GET_OC(f)   ( ( (f) & BACKSQL_ISF_GET_OC ) == BACKSQL_ISF_GET_OC )
#define BACKSQL_IS_MATCHED(f)   ( ( (f) & BACKSQL_ISF_MATCHED ) == BACKSQL_ISF_MATCHED )
#define BSQL_SF_NONE   0x0000U
#define BSQL_SF_ALL_USER   0x0001U
#define BSQL_SF_ALL_OPER   0x0002U
#define BSQL_SF_ALL_ATTRS   (BSQL_SF_ALL_USER|BSQL_SF_ALL_OPER)
#define BSQL_SF_FILTER_HASSUBORDINATE   0x0010U
#define BSQL_SF_FILTER_ENTRYUUID   0x0020U
#define BSQL_SF_FILTER_ENTRYCSN   0x0040U
#define BSQL_SF_RETURN_ENTRYUUID   (BSQL_SF_FILTER_ENTRYUUID << 8)
#define BSQL_ISF(bsi, f)   ( ( (bsi)->bsi_flags & f ) == f )
#define BSQL_ISF_ALL_USER(bsi)   BSQL_ISF(bsi, BSQL_SF_ALL_USER)
#define BSQL_ISF_ALL_OPER(bsi)   BSQL_ISF(bsi, BSQL_SF_ALL_OPER)
#define BSQL_ISF_ALL_ATTRS(bsi)   BSQL_ISF(bsi, BSQL_SF_ALL_ATTRS)
#define BACKSQL_SCOPE_BASE_LIKE   ( LDAP_SCOPE_BASE | 0x1000 )
#define BSQLF_SCHEMA_LOADED   0x0001
#define BSQLF_UPPER_NEEDS_CAST   0x0002
#define BSQLF_CREATE_NEEDS_SELECT   0x0004
#define BSQLF_FAIL_IF_NO_MAPPING   0x0008
#define BSQLF_HAS_LDAPINFO_DN_RU   0x0010
#define BSQLF_DONTCHECK_LDAPINFO_DN_RU   0x0020
#define BSQLF_USE_REVERSE_DN   0x0040
#define BSQLF_ALLOW_ORPHANS   0x0080
#define BSQLF_USE_SUBTREE_SHORTCUT   0x0100
#define BSQLF_FETCH_ALL_USERATTRS   0x0200
#define BSQLF_FETCH_ALL_OPATTRS   0x0400
#define BSQLF_FETCH_ALL_ATTRS   (BSQLF_FETCH_ALL_USERATTRS|BSQLF_FETCH_ALL_OPATTRS)
#define BSQLF_CHECK_SCHEMA   0x0800
#define BSQLF_AUTOCOMMIT_ON   0x1000
#define BACKSQL_ISF(si, f)   (((si)->sql_flags & f) == f)
#define BACKSQL_SCHEMA_LOADED(si)   BACKSQL_ISF(si, BSQLF_SCHEMA_LOADED)
#define BACKSQL_UPPER_NEEDS_CAST(si)   BACKSQL_ISF(si, BSQLF_UPPER_NEEDS_CAST)
#define BACKSQL_CREATE_NEEDS_SELECT(si)   BACKSQL_ISF(si, BSQLF_CREATE_NEEDS_SELECT)
#define BACKSQL_FAIL_IF_NO_MAPPING(si)   BACKSQL_ISF(si, BSQLF_FAIL_IF_NO_MAPPING)
#define BACKSQL_HAS_LDAPINFO_DN_RU(si)   BACKSQL_ISF(si, BSQLF_HAS_LDAPINFO_DN_RU)
#define BACKSQL_DONTCHECK_LDAPINFO_DN_RU(si)   BACKSQL_ISF(si, BSQLF_DONTCHECK_LDAPINFO_DN_RU)
#define BACKSQL_USE_REVERSE_DN(si)   BACKSQL_ISF(si, BSQLF_USE_REVERSE_DN)
#define BACKSQL_CANUPPERCASE(si)   (!BER_BVISNULL( &(si)->sql_upper_func ))
#define BACKSQL_ALLOW_ORPHANS(si)   BACKSQL_ISF(si, BSQLF_ALLOW_ORPHANS)
#define BACKSQL_USE_SUBTREE_SHORTCUT(si)   BACKSQL_ISF(si, BSQLF_USE_SUBTREE_SHORTCUT)
#define BACKSQL_FETCH_ALL_USERATTRS(si)   BACKSQL_ISF(si, BSQLF_FETCH_ALL_USERATTRS)
#define BACKSQL_FETCH_ALL_OPATTRS(si)   BACKSQL_ISF(si, BSQLF_FETCH_ALL_OPATTRS)
#define BACKSQL_FETCH_ALL_ATTRS(si)   BACKSQL_ISF(si, BSQLF_FETCH_ALL_ATTRS)
#define BACKSQL_CHECK_SCHEMA(si)   BACKSQL_ISF(si, BSQLF_CHECK_SCHEMA)
#define BACKSQL_AUTOCOMMIT_ON(si)   BACKSQL_ISF(si, BSQLF_AUTOCOMMIT_ON)
#define BACKSQL_BASEOBJECT_ID   0
#define BACKSQL_BASEOBJECT_IDSTR   LDAP_XSTRING(BACKSQL_BASEOBJECT_ID)
#define BACKSQL_BASEOBJECT_KEYVAL   0
#define BACKSQL_IS_BASEOBJECT_ID(id)   (*(id) == BACKSQL_BASEOBJECT_ID)
#define BACKSQL_BASEOBJECT_OC   0
#define BACKSQL_SUCCESS(rc)   ( (rc) == SQL_SUCCESS || (rc) == SQL_SUCCESS_WITH_INFO )
#define BACKSQL_AVL_STOP   0
#define BACKSQL_AVL_CONTINUE   1
#define BACKSQL_LEGAL_ERROR(rc)
#define BACKSQL_SANITIZE_ERROR(rc)   ( BACKSQL_LEGAL_ERROR( (rc) ) ? (rc) : LDAP_OTHER )
#define BACKSQL_IS_BINARY(ct)
#define BACKSQL_IDFMT   BACKSQL_IDNUMFMT
#define BACKSQL_IDARG(arg)   (arg)

Typedefs

typedef unsigned long backsql_key_t
typedef struct backsql_api backsql_api
typedef struct backsql_oc_map_rec backsql_oc_map_rec
typedef struct backsql_at_map_rec backsql_at_map_rec
typedef struct berbuf BerBuffer
typedef struct backsql_entryID backsql_entryID
typedef struct backsql_srch_info backsql_srch_info
typedef struct backsql_info backsql_info

Class Documentation

struct BACKSQL_ROW_NTS

Definition at line 180 of file back-sql.h.

Collaboration diagram for BACKSQL_ROW_NTS:
Class Members
BerVarray col_names
UDWORD * col_prec
SQLSMALLINT * col_type
char ** cols
SWORD ncols
SQLLEN * value_len
struct backsql_oc_map_rec

Definition at line 290 of file back-sql.h.

Collaboration diagram for backsql_oc_map_rec:
Class Members
Avlnode * bom_attrs
AttributeDescription * bom_create_hint
char * bom_create_keyval
char * bom_create_proc
char * bom_delete_proc
int bom_expect_return
backsql_key_t bom_id
ObjectClass * bom_oc
struct backsql_at_map_rec

Definition at line 318 of file back-sql.h.

Collaboration diagram for backsql_at_map_rec:
Class Members
AttributeDescription * bam_ad
char * bam_add_proc
char * bam_countquery
char * bam_delete_proc
int bam_expect_return
struct backsql_at_map_rec * bam_next
ObjectClass * bam_oc
int bam_param_order
char * bam_query
AttributeDescription * bam_true_ad
struct berbuf

Definition at line 380 of file back-sql.h.

Class Members
ber_len_t bb_len
struct backsql_entryID

Definition at line 390 of file back-sql.h.

Collaboration diagram for backsql_entryID:
Class Members
backsql_key_t eid_id
backsql_key_t eid_keyval
struct backsql_entryID * eid_next
backsql_oc_map_rec * eid_oc
backsql_key_t eid_oc_id
struct backsql_srch_info

Definition at line 432 of file back-sql.h.

Collaboration diagram for backsql_srch_info:
Class Members
AttributeName * bsi_attrs
backsql_entryID bsi_base_id
struct berval * bsi_base_ndn
backsql_entryID * bsi_c_eid
SQLHDBC bsi_dbh
Entry * bsi_e
Filter * bsi_filter
ObjectClass * bsi_filter_oc
unsigned bsi_flags
backsql_entryID * bsi_id_list
backsql_entryID ** bsi_id_listtail
int bsi_n_candidates
backsql_oc_map_rec * bsi_oc
Operation * bsi_op
SlapReply * bsi_rs
int bsi_scope
int bsi_status
time_t bsi_stoptime
int bsi_use_subtree_shortcut
struct backsql_info

Definition at line 484 of file back-sql.h.

Collaboration diagram for backsql_info:
Class Members
AttributeName * sql_anlist
backsql_api * sql_api
char * sql_at_query
char * sql_base_ob_file
Entry * sql_baseObject
MatchingRule * sql_caseIgnoreMatch
BerVarray sql_concat_func
char * sql_concat_patt
Avlnode * sql_db_conns
SQLHENV sql_db_env
ldap_pvt_thread_mutex_t sql_dbconn_mutex
SQLHDBC sql_dbh
char * sql_dbhost
char * sql_dbname
char * sql_dbpasswd
int sql_dbport
char * sql_dbuser
char * sql_delentry_stmt
char * sql_delobjclasses_stmt
unsigned int sql_flags
char * sql_has_children_query
char * sql_id_query
char * sql_insentry_stmt
char * sql_list_children_query
Avlnode * sql_oc_by_id
Avlnode * sql_oc_by_oc
char * sql_oc_query
char * sql_renentry_stmt
ldap_pvt_thread_mutex_t sql_schema_mutex
MatchingRule * sql_telephoneNumberMatch

Define Documentation

#define BACKSQL_ADD   0x1

Definition at line 368 of file back-sql.h.

#define BACKSQL_ALIASING   "AS "

Definition at line 253 of file back-sql.h.

#define BACKSQL_ALIASING_QUOTE   ""

Definition at line 263 of file back-sql.h.

Definition at line 560 of file back-sql.h.

#define BACKSQL_AT_CANUPPERCASE (   at)    ( !BER_BVISNULL( &(at)->bam_sel_expr_u ) )

Definition at line 365 of file back-sql.h.

#define BACKSQL_AT_MAP_REC_INIT   { NULL, NULL, BER_BVC(""), BER_BVC(""), BER_BVNULL, BER_BVNULL, NULL, NULL, NULL, 0, 0, NULL }

Definition at line 359 of file back-sql.h.

Definition at line 572 of file back-sql.h.

#define BACKSQL_AVL_CONTINUE   1

Definition at line 604 of file back-sql.h.

#define BACKSQL_AVL_STOP   0

Definition at line 603 of file back-sql.h.

#define BACKSQL_BASEOBJECT_ID   0

Definition at line 582 of file back-sql.h.

#define BACKSQL_BASEOBJECT_IDSTR   LDAP_XSTRING(BACKSQL_BASEOBJECT_ID)

Definition at line 583 of file back-sql.h.

#define BACKSQL_BASEOBJECT_KEYVAL   0

Definition at line 584 of file back-sql.h.

#define BACKSQL_BASEOBJECT_OC   0

Definition at line 587 of file back-sql.h.

#define BACKSQL_C_NUMID   SQL_C_ULONG

Definition at line 237 of file back-sql.h.

#define BACKSQL_CANUPPERCASE (   si)    (!BER_BVISNULL( &(si)->sql_upper_func ))

Definition at line 558 of file back-sql.h.

Definition at line 570 of file back-sql.h.

#define BACKSQL_CONCAT

Definition at line 376 of file back-sql.h.

Definition at line 210 of file back-sql.h.

Definition at line 548 of file back-sql.h.

#define BACKSQL_DEL   0x2

Definition at line 369 of file back-sql.h.

Definition at line 554 of file back-sql.h.

#define BACKSQL_ENTRYID_INIT   { 0, 0, 0, NULL, BER_BVNULL, BER_BVNULL, NULL }

Definition at line 416 of file back-sql.h.

Definition at line 550 of file back-sql.h.

Definition at line 568 of file back-sql.h.

Definition at line 566 of file back-sql.h.

Definition at line 564 of file back-sql.h.

Definition at line 552 of file back-sql.h.

#define BACKSQL_IDARG (   arg)    (arg)

Definition at line 627 of file back-sql.h.

Definition at line 626 of file back-sql.h.

#define BACKSQL_IDNUMFMT   "%lu"

Definition at line 238 of file back-sql.h.

#define BACKSQL_IS_ADD (   x)    ( ( BACKSQL_ADD & (x) ) == BACKSQL_ADD )

Definition at line 371 of file back-sql.h.

#define BACKSQL_IS_BASEOBJECT_ID (   id)    (*(id) == BACKSQL_BASEOBJECT_ID)

Definition at line 585 of file back-sql.h.

#define BACKSQL_IS_BINARY (   ct)
Value:
( (ct) == SQL_BINARY \
         || (ct) == SQL_VARBINARY \
         || (ct) == SQL_LONGVARBINARY)

Definition at line 617 of file back-sql.h.

#define BACKSQL_IS_DEL (   x)    ( ( BACKSQL_DEL & (x) ) == BACKSQL_DEL )

Definition at line 372 of file back-sql.h.

Definition at line 426 of file back-sql.h.

#define BACKSQL_IS_GET_ID (   f)    ( ( (f) & BACKSQL_ISF_GET_ID ) == BACKSQL_ISF_GET_ID )

Definition at line 424 of file back-sql.h.

#define BACKSQL_IS_GET_OC (   f)    ( ( (f) & BACKSQL_ISF_GET_OC ) == BACKSQL_ISF_GET_OC )

Definition at line 428 of file back-sql.h.

#define BACKSQL_IS_MATCHED (   f)    ( ( (f) & BACKSQL_ISF_MATCHED ) == BACKSQL_ISF_MATCHED )

Definition at line 430 of file back-sql.h.

#define BACKSQL_ISF (   si,
  f 
)    (((si)->sql_flags & f) == f)

Definition at line 541 of file back-sql.h.

#define BACKSQL_ISF_GET_ENTRY   ( 0x2U | BACKSQL_ISF_GET_ID )

Definition at line 421 of file back-sql.h.

#define BACKSQL_ISF_GET_ID   0x1U

Definition at line 420 of file back-sql.h.

#define BACKSQL_ISF_GET_OC   ( 0x4U | BACKSQL_ISF_GET_ID )

Definition at line 422 of file back-sql.h.

#define BACKSQL_ISF_MATCHED   0x8U

Definition at line 423 of file back-sql.h.

#define BACKSQL_LEGAL_ERROR (   rc)
Value:
( LDAP_RANGE( (rc), 0x00, 0x0e ) \
         || LDAP_ATTR_ERROR( (rc) ) \
         || LDAP_NAME_ERROR( (rc) ) \
         || LDAP_SECURITY_ERROR( (rc) ) \
         || LDAP_SERVICE_ERROR( (rc) ) \
         || LDAP_UPDATE_ERROR( (rc) ) )

Definition at line 607 of file back-sql.h.

#define BACKSQL_MAX_DN_LEN   255

Definition at line 195 of file back-sql.h.

#define BACKSQL_NCMP (   v1,
  v2 
)    ber_bvcmp((v1),(v2))

Definition at line 374 of file back-sql.h.

#define BACKSQL_OC_NAME (   ocmap)    ((ocmap)->bom_oc->soc_cname.bv_val)

Definition at line 295 of file back-sql.h.

Definition at line 215 of file back-sql.h.

#define BACKSQL_SANITIZE_ERROR (   rc)    ( BACKSQL_LEGAL_ERROR( (rc) ) ? (rc) : LDAP_OTHER )

Definition at line 614 of file back-sql.h.

Definition at line 544 of file back-sql.h.

#define BACKSQL_SCOPE_BASE_LIKE   ( LDAP_SCOPE_BASE | 0x1000 )

Definition at line 459 of file back-sql.h.

Definition at line 239 of file back-sql.h.

#define BACKSQL_SUCCESS (   rc)    ( (rc) == SQL_SUCCESS || (rc) == SQL_SUCCESS_WITH_INFO )

Definition at line 600 of file back-sql.h.

Definition at line 245 of file back-sql.h.

Definition at line 546 of file back-sql.h.

Definition at line 556 of file back-sql.h.

Definition at line 562 of file back-sql.h.

#define BB_NULL   { BER_BVNULL, 0 }

Definition at line 385 of file back-sql.h.

#define BSQL_ISF (   bsi,
  f 
)    ( ( (bsi)->bsi_flags & f ) == f )

Definition at line 445 of file back-sql.h.

#define BSQL_ISF_ALL_ATTRS (   bsi)    BSQL_ISF(bsi, BSQL_SF_ALL_ATTRS)

Definition at line 448 of file back-sql.h.

#define BSQL_ISF_ALL_OPER (   bsi)    BSQL_ISF(bsi, BSQL_SF_ALL_OPER)

Definition at line 447 of file back-sql.h.

#define BSQL_ISF_ALL_USER (   bsi)    BSQL_ISF(bsi, BSQL_SF_ALL_USER)

Definition at line 446 of file back-sql.h.

Definition at line 440 of file back-sql.h.

#define BSQL_SF_ALL_OPER   0x0002U

Definition at line 439 of file back-sql.h.

#define BSQL_SF_ALL_USER   0x0001U

Definition at line 438 of file back-sql.h.

#define BSQL_SF_FILTER_ENTRYCSN   0x0040U

Definition at line 443 of file back-sql.h.

#define BSQL_SF_FILTER_ENTRYUUID   0x0020U

Definition at line 442 of file back-sql.h.

#define BSQL_SF_FILTER_HASSUBORDINATE   0x0010U

Definition at line 441 of file back-sql.h.

#define BSQL_SF_NONE   0x0000U

Definition at line 437 of file back-sql.h.

Definition at line 444 of file back-sql.h.

#define BSQLF_ALLOW_ORPHANS   0x0080

Definition at line 533 of file back-sql.h.

#define BSQLF_AUTOCOMMIT_ON   0x1000

Definition at line 539 of file back-sql.h.

#define BSQLF_CHECK_SCHEMA   0x0800

Definition at line 538 of file back-sql.h.

#define BSQLF_CREATE_NEEDS_SELECT   0x0004

Definition at line 528 of file back-sql.h.

#define BSQLF_DONTCHECK_LDAPINFO_DN_RU   0x0020

Definition at line 531 of file back-sql.h.

#define BSQLF_FAIL_IF_NO_MAPPING   0x0008

Definition at line 529 of file back-sql.h.

Definition at line 537 of file back-sql.h.

#define BSQLF_FETCH_ALL_OPATTRS   0x0400

Definition at line 536 of file back-sql.h.

#define BSQLF_FETCH_ALL_USERATTRS   0x0200

Definition at line 535 of file back-sql.h.

#define BSQLF_HAS_LDAPINFO_DN_RU   0x0010

Definition at line 530 of file back-sql.h.

#define BSQLF_SCHEMA_LOADED   0x0001

Definition at line 526 of file back-sql.h.

#define BSQLF_UPPER_NEEDS_CAST   0x0002

Definition at line 527 of file back-sql.h.

#define BSQLF_USE_REVERSE_DN   0x0040

Definition at line 532 of file back-sql.h.

#define BSQLF_USE_SUBTREE_SHORTCUT   0x0100

Definition at line 534 of file back-sql.h.


Typedef Documentation

typedef struct backsql_api backsql_api
typedef struct backsql_info backsql_info
typedef unsigned long backsql_key_t

Definition at line 236 of file back-sql.h.

typedef struct berbuf BerBuffer