コード例 #1
0
 def get_trades_for(self, ticker):
     """ return all Trades where account_pk == self.pk. 
     returns a list of Trade objects """
     return Trade.all_from_where_clause("WHERE account_pk=? AND ticker=?",
                                        (self.pk, ticker))
コード例 #2
0
 def get_trades_for(self, ticker):
     #takes in ticker symbol, return all trades for that symbol
     return Trade.all_from_where_clause('WHERE account_pk=? AND ticker=?' (
         self.pk, ticker))
コード例 #3
0
 def get_trades(self):
     """ return all Trades where account_pk == self.pk. 
     returns a list of Trade objects """
     return Trade.all_from_where_clause("WHERE account_pk=?", (self.pk, ))
コード例 #4
0
 def get_trades(self):
     #return all trades by that user
     return Trade.all_from_where_clause("WHERE account_pk=?", (self.pk, ))