source: branches/samba-3.2.x/docs/manpages/ldb.3@ 216

Last change on this file since 216 was 205, checked in by Herwig Bauernfeind, 16 years ago

Update 3.2 branch to 3.2.5

File size: 7.4 KB
Line 
1.\" Title: ldb
2.\" Author:
3.\" Generator: DocBook XSL Stylesheets v1.73.1 <http://docbook.sf.net/>
4.\" Date: 11/20/2008
5.\" Manual: C Library Functions
6.\" Source: Samba 3.2
7.\"
8.TH "LDB" "3" "11/20/2008" "Samba 3\.2" "C Library Functions"
9.\" disable hyphenation
10.nh
11.\" disable justification (adjust text to left margin only)
12.ad l
13.SH "NAME"
14ldb - A light-weight database library
15.SH "SYNOPSIS"
16.sp
17.RS 4
18.nf
19#include <ldb\.h>
20.fi
21.RE
22.SH "DESCRIPTION"
23.PP
24ldb is a light weight embedded database library and API\. With a programming interface that is very similar to LDAP, ldb can store its data either in a tdb(3) database or in a real LDAP database\.
25.PP
26When used with the tdb backend ldb does not require any database daemon\. Instead, ldb function calls are processed immediately by the ldb library, which does IO directly on the database, while allowing multiple readers/writers using operating system byte range locks\. This leads to an API with very low overheads, often resulting in speeds of more than 10x what can be achieved with a more traditional LDAP architecture\.
27.PP
28In a taxonomy of databases ldb would sit half way between key/value pair databases (such as berkley db or tdb) and a full LDAP database\. With a structured attribute oriented API like LDAP and good indexing capabilities, ldb can be used for quite sophisticated applications that need a light weight database, without the administrative overhead of a full LDAP installation\.
29.PP
30Included with ldb are a number of useful command line tools for manipulating a ldb database\. These tools are similar in style to the equivalent ldap command line tools\.
31.PP
32In its default mode of operation with a tdb backend, ldb can also be seen as a "schema\-less LDAP"\. By default ldb does not require a schema, which greatly reduces the complexity of getting started with ldb databases\. As the complexity of you application grows you can take advantage of some of the optional schema\-like attributes that ldb offers, or you can migrate to using the full LDAP api while keeping your exiting ldb code\.
33.PP
34If you are new to ldb, then I suggest starting with the manual pages for ldbsearch(1) and ldbedit(1), and experimenting with a local database\. Then I suggest you look at the ldb_connect(3) and ldb_search(3) manual pages\.
35.SH "TOOLS"
36.sp
37.RS 4
38.ie n \{\
39\h'-04'\(bu\h'+03'\c
40.\}
41.el \{\
42.sp -1
43.IP \(bu 2.3
44.\}
45
46ldbsearch(1)
47\- command line ldb search utility
48.RE
49.sp
50.RS 4
51.ie n \{\
52\h'-04'\(bu\h'+03'\c
53.\}
54.el \{\
55.sp -1
56.IP \(bu 2.3
57.\}
58
59ldbedit(1)
60\- edit all or part of a ldb database using your favourite editor
61.RE
62.sp
63.RS 4
64.ie n \{\
65\h'-04'\(bu\h'+03'\c
66.\}
67.el \{\
68.sp -1
69.IP \(bu 2.3
70.\}
71
72ldbadd(1)
73\- add records to a ldb database using LDIF formatted input
74.RE
75.sp
76.RS 4
77.ie n \{\
78\h'-04'\(bu\h'+03'\c
79.\}
80.el \{\
81.sp -1
82.IP \(bu 2.3
83.\}
84
85ldbdel(1)
86\- delete records from a ldb database
87.RE
88.sp
89.RS 4
90.ie n \{\
91\h'-04'\(bu\h'+03'\c
92.\}
93.el \{\
94.sp -1
95.IP \(bu 2.3
96.\}
97
98ldbmodify(1)
99\- modify records in a ldb database using LDIF formatted input
100.SH "FUNCTIONS"
101.sp
102.RS 4
103.ie n \{\
104\h'-04'\(bu\h'+03'\c
105.\}
106.el \{\
107.sp -1
108.IP \(bu 2.3
109.\}
110
111\fBldb_connect(3)\fR
112\- connect to a ldb backend
113.RE
114.sp
115.RS 4
116.ie n \{\
117\h'-04'\(bu\h'+03'\c
118.\}
119.el \{\
120.sp -1
121.IP \(bu 2.3
122.\}
123
124\fBldb_search(3)\fR
125\- perform a database search
126.RE
127.sp
128.RS 4
129.ie n \{\
130\h'-04'\(bu\h'+03'\c
131.\}
132.el \{\
133.sp -1
134.IP \(bu 2.3
135.\}
136
137\fBldb_add(3)\fR
138\- add a record to the database
139.RE
140.sp
141.RS 4
142.ie n \{\
143\h'-04'\(bu\h'+03'\c
144.\}
145.el \{\
146.sp -1
147.IP \(bu 2.3
148.\}
149
150\fBldb_delete(3)\fR
151\- delete a record from the database
152.RE
153.sp
154.RS 4
155.ie n \{\
156\h'-04'\(bu\h'+03'\c
157.\}
158.el \{\
159.sp -1
160.IP \(bu 2.3
161.\}
162
163\fBldb_modify(3)\fR
164\- modify a record in the database
165.RE
166.sp
167.RS 4
168.ie n \{\
169\h'-04'\(bu\h'+03'\c
170.\}
171.el \{\
172.sp -1
173.IP \(bu 2.3
174.\}
175
176\fBldb_errstring(3)\fR
177\- retrieve extended error information from the last operation
178.RE
179.sp
180.RS 4
181.ie n \{\
182\h'-04'\(bu\h'+03'\c
183.\}
184.el \{\
185.sp -1
186.IP \(bu 2.3
187.\}
188
189\fBldb_ldif_write(3)\fR
190\- write a LDIF formatted message
191.RE
192.sp
193.RS 4
194.ie n \{\
195\h'-04'\(bu\h'+03'\c
196.\}
197.el \{\
198.sp -1
199.IP \(bu 2.3
200.\}
201
202\fBldb_ldif_write_file(3)\fR
203\- write a LDIF formatted message to a file
204.RE
205.sp
206.RS 4
207.ie n \{\
208\h'-04'\(bu\h'+03'\c
209.\}
210.el \{\
211.sp -1
212.IP \(bu 2.3
213.\}
214
215\fBldb_ldif_read(3)\fR
216\- read a LDIF formatted message
217.RE
218.sp
219.RS 4
220.ie n \{\
221\h'-04'\(bu\h'+03'\c
222.\}
223.el \{\
224.sp -1
225.IP \(bu 2.3
226.\}
227
228\fBldb_ldif_read_free(3)\fR
229\- free the result of a ldb_ldif_read()
230.RE
231.sp
232.RS 4
233.ie n \{\
234\h'-04'\(bu\h'+03'\c
235.\}
236.el \{\
237.sp -1
238.IP \(bu 2.3
239.\}
240
241\fBldb_ldif_read_file(3)\fR
242\- read a LDIF message from a file
243.RE
244.sp
245.RS 4
246.ie n \{\
247\h'-04'\(bu\h'+03'\c
248.\}
249.el \{\
250.sp -1
251.IP \(bu 2.3
252.\}
253
254\fBldb_ldif_read_string(3)\fR
255\- read a LDIF message from a string
256.RE
257.sp
258.RS 4
259.ie n \{\
260\h'-04'\(bu\h'+03'\c
261.\}
262.el \{\
263.sp -1
264.IP \(bu 2.3
265.\}
266
267\fBldb_msg_find_element(3)\fR
268\- find an element in a ldb_message
269.RE
270.sp
271.RS 4
272.ie n \{\
273\h'-04'\(bu\h'+03'\c
274.\}
275.el \{\
276.sp -1
277.IP \(bu 2.3
278.\}
279
280\fBldb_val_equal_exact(3)\fR
281\- compare two ldb_val structures
282.RE
283.sp
284.RS 4
285.ie n \{\
286\h'-04'\(bu\h'+03'\c
287.\}
288.el \{\
289.sp -1
290.IP \(bu 2.3
291.\}
292
293\fBldb_msg_find_val(3)\fR
294\- find an element by value
295.RE
296.sp
297.RS 4
298.ie n \{\
299\h'-04'\(bu\h'+03'\c
300.\}
301.el \{\
302.sp -1
303.IP \(bu 2.3
304.\}
305
306\fBldb_msg_add_empty(3)\fR
307\- add an empty message element to a ldb_message
308.RE
309.sp
310.RS 4
311.ie n \{\
312\h'-04'\(bu\h'+03'\c
313.\}
314.el \{\
315.sp -1
316.IP \(bu 2.3
317.\}
318
319\fBldb_msg_add(3)\fR
320\- add a non\-empty message element to a ldb_message
321.RE
322.sp
323.RS 4
324.ie n \{\
325\h'-04'\(bu\h'+03'\c
326.\}
327.el \{\
328.sp -1
329.IP \(bu 2.3
330.\}
331
332\fBldb_msg_element_compare(3)\fR
333\- compare two ldb_message_element structures
334.RE
335.sp
336.RS 4
337.ie n \{\
338\h'-04'\(bu\h'+03'\c
339.\}
340.el \{\
341.sp -1
342.IP \(bu 2.3
343.\}
344
345\fBldb_msg_find_int(3)\fR
346\- return an integer value from a ldb_message
347.RE
348.sp
349.RS 4
350.ie n \{\
351\h'-04'\(bu\h'+03'\c
352.\}
353.el \{\
354.sp -1
355.IP \(bu 2.3
356.\}
357
358\fBldb_msg_find_uint(3)\fR
359\- return an unsigned integer value from a ldb_message
360.RE
361.sp
362.RS 4
363.ie n \{\
364\h'-04'\(bu\h'+03'\c
365.\}
366.el \{\
367.sp -1
368.IP \(bu 2.3
369.\}
370
371\fBldb_msg_find_double(3)\fR
372\- return a double value from a ldb_message
373.RE
374.sp
375.RS 4
376.ie n \{\
377\h'-04'\(bu\h'+03'\c
378.\}
379.el \{\
380.sp -1
381.IP \(bu 2.3
382.\}
383
384\fBldb_msg_find_string(3)\fR
385\- return a string value from a ldb_message
386.RE
387.sp
388.RS 4
389.ie n \{\
390\h'-04'\(bu\h'+03'\c
391.\}
392.el \{\
393.sp -1
394.IP \(bu 2.3
395.\}
396
397\fBldb_set_alloc(3)\fR
398\- set the memory allocation function to be used by ldb
399.RE
400.sp
401.RS 4
402.ie n \{\
403\h'-04'\(bu\h'+03'\c
404.\}
405.el \{\
406.sp -1
407.IP \(bu 2.3
408.\}
409
410\fBldb_set_debug(3)\fR
411\- set a debug handler to be used by ldb
412.RE
413.sp
414.RS 4
415.ie n \{\
416\h'-04'\(bu\h'+03'\c
417.\}
418.el \{\
419.sp -1
420.IP \(bu 2.3
421.\}
422
423\fBldb_set_debug_stderr(3)\fR
424\- set a debug handler for stderr output
425.SH "AUTHOR"
426.PP
427ldb was written by
428Andrew Tridgell\.
429.PP
430If you wish to report a problem or make a suggestion then please see the
431: http://ldb.samba.org/
432web site for current contact and maintainer information\.
433.PP
434ldb is released under the GNU Lesser General Public License version 2 or later\. Please see the file COPYING for license details\.
Note: See TracBrowser for help on using the repository browser.