Xmlb.Query¶
- Subclasses:
 None
Methods¶
- Inherited:
 - Structs:
 
class  | 
  | 
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
- Inherited:
 
Properties¶
None
Signals¶
- Inherited:
 
Fields¶
- Inherited:
 
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
parent_instance  | 
r  | 
Class Details¶
- class Xmlb.Query(**kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
- classmethod new(silo, xpath)¶
 - Parameters:
 - Raises:
 - Returns:
 - Return type:
 
Creates a query to be used by silo. It may be quicker to create a query manually and re-use it multiple times.
New in version 0.1.4.
- classmethod new_full(silo, xpath, flags)¶
 - Parameters:
 xpath (
str) – The XPath queryflags (
Xmlb.QueryFlags) – someXmlb.QueryFlags, e.g.Xmlb.QueryFlags.USE_INDEXES
- Raises:
 - Returns:
 - Return type:
 
Creates a query to be used by silo. It may be quicker to create a query manually and re-use it multiple times.
The query will point to strings inside silo, so the lifetime of silo must exceed the lifetime of the returned query.
New in version 0.1.6.
- bind_str(idx, str)¶
 - Parameters:
 - Raises:
 - Returns:
 Trueif the idx existed- Return type:
 
Assigns a string to a bound value specified using
?.New in version 0.1.4.
Deprecated since version 0.3.0: Use
Xmlb.ValueBindingsandXmlb.ValueBindings.bind_str() instead. That keeps the value bindings separate from theXmlb.Query, allowing queries to be re-used over time and between threads.
- bind_val(idx, val)¶
 - Parameters:
 - Raises:
 - Returns:
 Trueif the idx existed- Return type:
 
Assigns a string to a bound value specified using
?.New in version 0.1.4.
Deprecated since version 0.3.0: Use
Xmlb.ValueBindingsandXmlb.ValueBindings.bind_val() instead. That keeps the value bindings separate from theXmlb.Query, allowing queries to be re-used over time and between threads.
- get_flags()¶
 - Returns:
 Xmlb.QueryFlags, defaultXmlb.QueryFlags.NONE- Return type:
 
Gets the flags used for this query.
New in version 0.1.15.
Deprecated since version 0.3.0: This is not thread-safe. Use
Xmlb.QueryContext.get_flags() instead.
- get_limit()¶
 - Returns:
 integer, default 0
- Return type:
 
Gets the results limit on this query, where 0 is ‘all’.
New in version 0.1.4.
Deprecated since version 0.3.0: This is not thread-safe. Use
Xmlb.QueryContext.get_limit() instead.
- get_xpath()¶
 - Returns:
 string
- Return type:
 
Gets the XPath string that created the query.
New in version 0.1.4.
- set_flags(flags)¶
 - Parameters:
 flags (
Xmlb.QueryFlags) – aXmlb.QueryFlags, e.g.Xmlb.QueryFlags.USE_INDEXES
Sets the flags to use for this query.
New in version 0.1.15.
Deprecated since version 0.3.0: This is not thread-safe. Use
Xmlb.QueryContext.set_flags() instead.
- set_limit(limit)¶
 - Parameters:
 limit (
int) – integer
Sets the results limit on this query, where 0 is ‘all’.
New in version 0.1.4.
Deprecated since version 0.3.0: This is not thread-safe. Use
Xmlb.QueryContext.set_limit() instead.