Class to handle Exchange data.
More...
|
def | __str__ (self) |
| Returns the content of this instance as string. More...
|
|
def | __init__ (self, **kwargs) |
| Initialise the instance and set attributes optionally. More...
|
|
def | __repr__ (self) |
| Returns the representation of this object as string. More...
|
|
def | update (self, **kwargs) |
| Update instance arguments. More...
|
|
def | add2db (self) |
| Add an object to the database. More...
|
|
◆ __str__()
def smm.objects.Exchange.__str__ |
( |
|
self | ) |
|
Returns the content of this instance as string.
References smm.objects.Exchange.description, smm.objects.Currency.description, smm.objects.SMMBaseObject.id, smm.objects.Exchange.id, smm.objects.Currency.id, smm.objects.Share.id, smm.objects.DailyQuote.id, smm.objects.Transaction.id, smm.objects.Watch.id, smm.objects.Position.id, smm.objects.Exchange.symbol, and smm.objects.Share.symbol.
Referenced by smm.objects.SMMBaseObject.__repr__().
◆ get()
def smm.objects.Exchange.get |
( |
|
id = None , |
|
|
|
symbol = None , |
|
|
|
city = None |
|
) |
| |
|
static |
Query Exchange objects.
There are three ways for querying objects:
- Querying by
id
returns an Exchange object or None
- Querying by
symbol
returns an Exchange object or None
- Querying without parameters to get all Exchange objects
The last way returns always a storm.store.ResultSet.
- Parameters
-
id | Returns an Exchange specified by id . |
symbol | Returns an Exchange specified by symbol . |
city | Returns an Exchange specified by city . |
- Searching for city:
- Searching to an exchange specified by the
city
parameter searches the database currently SQLite using the LIKE
operator.
To balance the different behaviour of LIKE between ascii and unicode sequences. The city
parameter is always capitalised.
- SQLite documentation of the
LIKE
operator: - The default behavior of the LIKE operator is to ignore case for ASCII characters. Hence, by default 'a' LIKE 'A' is true. The case_sensitive_like pragma installs a new application-defined LIKE function that can change this behavior. When case_sensitive_like is enabled, 'a' LIKE 'A' is false but 'a' LIKE 'a' is still true.
- Sorting:
- The result are unsorted
- Test:
- tests.test_objects.TestObjects.test_Exchange_get()
◆ getCount()
def smm.objects.Exchange.getCount |
( |
| ) |
|
|
static |
◆ __storm_table__
string smm.objects.Exchange.__storm_table__ = "t_exchange" |
|
staticprivate |
Use given table to store all of this class inside.
◆ arguments
dictionary smm.objects.Exchange.arguments |
|
static |
◆ description
smm.objects.Exchange.description = Unicode() |
|
static |
◆ id
smm.objects.Exchange.id = Int(default=AutoReload, primary=True) |
|
static |
◆ psTopic
string smm.objects.Exchange.psTopic = "smm.exchange" |
|
static |
◆ symbol
smm.objects.Exchange.symbol = Unicode() |
|
static |
The documentation for this class was generated from the following file: