File: sequence.rd

package info (click to toggle)
ruby-bdb 0.6.6-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,652 kB
  • ctags: 4,687
  • sloc: ansic: 13,663; cpp: 8,601; ruby: 7,903; sh: 47; makefile: 18
file content (80 lines) | stat: -rw-r--r-- 1,749 bytes parent folder | download | duplicates (11)
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
78
79
80
=begin
== BDB::Sequence

# module BDB
#^

A sequence is created with BDB::Common::create_sequence or 
BDB::Common::open_sequence (only with db >= 4.3)

#^

=== class BDB::Common

--- create_sequence(key, init = nil, options = {}) {|sequence| }
     create a new sequence (see also ((|open_sequence|)))
     
     equivalent to 
     ((|open_sequence(key, BDB::CREATE|BDB::EXCL, init, options)|))
     
     return (or yield) an object BDB::Sequence

--- open_sequence(key, flags = 0, init = nil, options = {}) {|sequence| }
     create or open a sequence (see BDB::Sequence)
     
     ((|key|)) : key for the sequence
     
     ((|flags|)) : flags can have BDB::CREATE, BDB::EXCL, BDB::AUTO_COMMIT,
     BDB::THREAD
     
     ((|init|)) : initial value for the sequence
     
     ((|options|)) : hash with the possible keys "set_cachesize",
     "set_flags" and "set_range"
     
     return (or yield) an object BDB::Sequence
 
#^

# class Sequence

=== Methods

--- cachesize
     return the current cache size

--- close
     close the sequence

--- db
     return the bdb file associated with the sequence

--- flags
     return the current flags

--- get(delta = 1, flags = 0)
     return the next available element in the sequence and changes
     the sequence value by ((|delta|))
     
     ((|flags|)) can have the value BDB::AUTO_COMMIT, BDB::TXN_NOSYNC

--- key
     return the key associated with the sequence

--- range
     return the range of values in the sequence

--- remove(flags = 0)
     remove the sequence
     
     ((|flags|)) can have the value BDB::AUTO_COMMIT, BDB::TXN_NOSYNC

--- stat(flags = 0)
     return statistics about the sequence
     
     ((|flags|)) can have the value BDB::STAT_CLEAR

# end
# end

=end