File: context.rd

package info (click to toggle)
libdb-ruby 0.6.5-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 2,596 kB
  • ctags: 3,978
  • sloc: ansic: 13,984; cpp: 8,739; ruby: 7,864; sh: 47; makefile: 6
file content (92 lines) | stat: -rw-r--r-- 2,388 bytes parent folder | download | duplicates (7)
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
81
82
83
84
85
86
87
88
89
90
91
92
=begin
== BDB::XML::Context

The Context class encapsulates the context within which a query
is performed against an Container. The context includes namespace 
mappings, variable bindings, and flags that indicate how the query result 
set should be determined and returned to the caller. Multiple queries can 
be executed within the same Context;

Context allows you to define whether queries executed within the
context are to be evaluated lazily or eagerly, and whether the query
is to return live or dead values.

The Query syntax permits expressions to refer to namespace prefixes,
but not to define them. The Context class provides namespace
management methods so that the caller may manage the namespace prefix to
URI mapping. By default the prefix "dbxml" is defined to be
"http://www.sleepycat.com/2002/dbxml". 

The Query syntax also permits expressions to refer to externally
defined variables. The XmlQueryContext class provides methods that
allow the caller to manage the externally-declared variable to value
bindings. 

=== Methods

--- self[variable]

    Get the value bound to a variable
   
--- self[variable] = value

    Bind a value to a variable
   
--- clear_namespaces

    Delete all the namespace prefix mappings
   
--- collection

    Discover the name of the default collection used by fn:collection()
    with no arguments in an XQuery expression.

--- collection = uri

    Set theURI specifying the name of the collection. 
   
    The default collection is that which is used by fn:collection()
    without any arguments in an XQuery expression.

--- del_namespace(name)

    Delete the namespace URI for a particular prefix
   
--- evaltype

    Return the evaluation type
   
--- evaltype = type

    Set the evaluation type
   
--- get_namespace(name)

    Get the namespace URI that a namespace prefix maps onto
   
--- get_results(name)

    Same than Context#[] but return the sequence of values bound to the variable.

--- returntype

    Return the return type
   
--- returntype = type

    Set the return type
   
--- set_namespace(name, uri)

    Define a namespace prefix, providing the URI that it maps onto
    
    If ((|uri|)) is ((|nil|)) delete the namespace

--- uri
 
    Returns the base URI used for relative paths in query expressions.
   
--- uri = val
    
    Sets the base URI used for relative paths in query expressions.
=end