EBackend.CacheColumnValues¶
Fields¶
None
Methods¶
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class EBackend.CacheColumnValues¶
- classmethod new()¶
- Returns:
a new
EBackend.CacheColumnValues. Free withEBackend.CacheColumnValues.free(), when no longer needed.- Return type:
Creates a new
EBackend.CacheColumnValuesto store values for additional columns. The column names are compared case insensitively.Added in version 3.26.
- contains(name)¶
- Parameters:
name (
str) – a column name- Returns:
Whether self contains column named name.
- Return type:
Added in version 3.26.
- copy()¶
- Returns:
Copy of the self. Free with
EBackend.CacheColumnValues.free(), when no longer needed.- Return type:
Added in version 3.26.
- free()¶
Frees previously allocated self with
EBackend.CacheColumnValues.new() orEBackend.CacheColumnValues.copy().Added in version 3.26.
- get_size()¶
- Returns:
How many columns are stored in the self.
- Return type:
Added in version 3.26.
- init_iter(iter)¶
- Parameters:
iter ({
object:object}) – aGLib.HashTableIter
Initialized the iter, thus the self can be traversed with
GLib.HashTableIter.next(). The key is a column name and the value is the corresponding column value.Added in version 3.26.
- lookup(name)¶
- Parameters:
name (
str) – a column name- Returns:
Stored value for the column named name, or
None, if no such column values is stored.- Return type:
Looks up currently stored value for the column named name. As the values can be
Noneone cannot distinguish between a column which doesn’t have stored any value and a column which has storedNonevalue. UseEBackend.CacheColumnValues.contains() to check whether such column exitst in the self. The returned pointer is owned by self and is valid until the value is overwritten of the self freed.Added in version 3.26.
- put(name, value)¶
-
Puts the value for column name. If contains a value for the same column, then it is replaced. This creates a copy of both name and value.
Added in version 3.26.
- remove(name)¶
- Parameters:
name (
str) – a column name- Returns:
Whether such column existed and had been removed.
- Return type:
Removes value for the column named name from self.
Added in version 3.26.
- remove_all()¶
Removes all values from the self, leaving it empty.
Added in version 3.26.
- take(name, value)¶
-
Puts the value for column name. If contains a value for the same column, then it is replaced. This creates takes ownership of both the name and the value.
Added in version 3.26.