File: dblogcursor.rst

package info (click to toggle)
python-bsddb3 6.2.9-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,596 kB
  • sloc: python: 14,884; ansic: 8,168; makefile: 217; sh: 5
file content (77 lines) | stat: -rw-r--r-- 2,011 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
===========
DBLogCursor
===========

Read :Oracle:`Oracle documentation <programmer_reference/index.html>`
for better understanding.

:OracleAPIC:`More info... <logc.html>`

DBLogCursor Methods
-------------------

.. function:: close()

   Discards the log cursor.
   :OracleAPIC:`More info... <logcclose.html>`

DBLogCursor Get Methods
-----------------------

These DBLogCursor methods are all wrappers around the get() function in
the C API.

These functions returns a tuple. The first element is a LSN tuple,
and the second element is a string/bytes with the log data.

If the following methods don't have log data to return, they return
None.

.. function:: current()

   Return the log record to which the log currently refers.
   :OracleAPIC:`More info... <logcget.html#get_DB_CURRENT>`

.. function:: first()

   The first record from any of the log files found in the log
   directory is returned.

   This method will return None if the log is empty. 

   :OracleAPIC:`More info... <logcget.html#get_DB_FIRST>`

.. function:: last()

   The last record in the log is returned.

   This method will return None if the log is empty. 

   :OracleAPIC:`More info... <logcget.html#get_DB_LAST>`

.. function:: next()

   The current log position is advanced to the next record in the log,
   and that record is returned. If the cursor position was not set
   previously, it will return the first record in the log.

   This method will return None if the log is empty. 

   :OracleAPIC:`More info... <logcget.html#get_DB_NEXT>`

.. function:: prev()

   The current log position is advanced to the previous record in the
   log, and that record is returned. If the cursor position was not set
   previously, it will return the last record in the log.
   
   This method will return None if the log is empty. 

   :OracleAPIC:`More info... <logcget.html#get_DB_PREV>`

.. function:: set(lsn)

   Retrieve the record specified by the lsn parameter.

   :OracleAPIC:`More info... <logcget.html#get_DB_SET>`