2 insert into ldap_oc_mappings
3 (id,name, keytbl, keycol, create_proc,
4 delete_proc,expect_return)
6 (1,'inetOrgPerson','persons','id', 'insert into persons (name) values ('');\n select last_insert_id();',
9 insert into ldap_oc_mappings
10 (id, name, keytbl, keycol,create_proc,delete_proc,expect_return)
12 (2, 'document','documents','id', NULL, NULL, 0);
14 insert into ldap_oc_mappings
15 (id,name, keytbl, keycol,create_proc,delete_proc,expect_return)
17 (3,'organization','institutes','id', NULL, NULL, 0);
20 insert into ldap_attr_mappings
21 (id, oc_map_id, name, sel_expr, from_tbls,join_where,add_proc,
22 delete_proc,param_order,expect_return)
24 (1, 1, 'cn', 'persons.name', 'persons',NULL, NULL,
27 insert into ldap_attr_mappings
28 (id, oc_map_id,name, sel_expr, from_tbls,
29 join_where, add_proc,delete_proc,param_order,expect_return)
31 (2, 1, 'telephoneNumber','phones.phone','persons,phones',
32 'phones.pers_id=persons.id', NULL, NULL, 3, 0);
34 insert into ldap_attr_mappings
35 (id,oc_map_id, name, sel_expr, from_tbls, join_where,add_proc,
36 delete_proc,param_order,expect_return)
38 (3, 1, 'sn', 'persons.name','persons', NULL, NULL,
41 insert into ldap_attr_mappings
42 (id, oc_map_id, name, sel_expr, from_tbls, join_where,
43 add_proc,delete_proc,param_order,expect_return)
45 (4, 2, 'description', 'documents.abstract','documents', NULL,
48 insert into ldap_attr_mappings
49 (id, oc_map_id, name, sel_expr, from_tbls, join_where,
50 add_proc,delete_proc,param_order,expect_return)
52 (5, 2, 'documentTitle','documents.title','documents',NULL,
55 -- insert into ldap_attr_mappings (id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
56 -- values (6,2,'documentAuthor','persons.name','persons,documents,authors_docs',
57 -- 'persons.id=authors_docs.pers_id AND documents.id=authors_docs.doc_id',
60 insert into ldap_attr_mappings
61 (id, oc_map_id, name, sel_expr, from_tbls, join_where,add_proc,
62 delete_proc,param_order,expect_return)
64 (7, 3, 'o', 'institutes.name', 'institutes', NULL, NULL,
67 insert into ldap_attr_mappings (id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
68 values (8,1,'documentDN','ldap_entries.dn','ldap_entries,documents,authors_docs,persons',
69 'ldap_entries.keyval=documents.id AND ldap_entries.oc_map_id=2 AND authors_docs.doc_id=documents.id AND authors_docs.pers_id=persons.id',
72 insert into ldap_attr_mappings (id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
73 values (9,2,'documentAuthor','ldap_entries.dn','ldap_entries,documents,authors_docs,persons',
74 'ldap_entries.keyval=persons.id AND ldap_entries.oc_map_id=1 AND authors_docs.doc_id=documents.id AND authors_docs.pers_id=persons.id',
79 insert into ldap_entries
80 (id, dn, oc_map_id, parent, keyval)
82 (1, 'o=sql,c=RU', 3, 0, 1);
84 insert into ldap_entries
85 (id, dn, oc_map_id, parent, keyval)
87 (2, 'cn=Mitya Kovalev,o=sql,c=RU', 1, 1, 1);
89 insert into ldap_entries (id,dn,oc_map_id,parent,keyval)
90 values (3,'cn=Torvlobnor Puzdoy,o=sql,c=RU',1,1,2);
92 insert into ldap_entries (id,dn,oc_map_id,parent,keyval)
93 values (4,'cn=Akakiy Zinberstein,o=sql,c=RU',1,1,3);
95 insert into ldap_entries (id,dn,oc_map_id,parent,keyval)
96 values (5,'documentTitle=book1,o=sql,c=RU',2,1,1);
98 insert into ldap_entries (id,dn,oc_map_id,parent,keyval)
99 values (6,'documentTitle=book2,o=sql,c=RU',2,1,2);
104 insert into ldap_entry_objclasses (entry_id,oc_name)
105 values (4,'referral');
107 insert into ldap_referrals (entry_id,url)
108 values (4,'http://localhost');