예제 #1
0
 def test_unbound_opt_only_adds_to_strat(self):
     opts = [
         strategy_options._UnboundLoad().some_col_opt_strategy(
             "name", {"bat": "hoho"}),
         strategy_options._UnboundLoad().some_col_opt_only(
             "name", {"foo": "bar"}),
     ]
     self._assert_attrs(opts, {"foo": "bar", "bat": "hoho"})
예제 #2
0
 def test_unbound_strat_opt_recvs_from_optonly(self):
     opts = [
         strategy_options._UnboundLoad().some_col_opt_only(
             "name", {"foo": "bar"}),
         strategy_options._UnboundLoad().some_col_opt_strategy(
             "name", {"bat": "hoho"})
     ]
     self._assert_attrs(opts, {"foo": "bar", "bat": "hoho"})
예제 #3
0
 def test_unbound_strat_opt_recvs_from_optonly(self):
     opts = [
         strategy_options._UnboundLoad().some_col_opt_only(
             "name", {"foo": "bar"}
         ),
         strategy_options._UnboundLoad().some_col_opt_strategy(
             "name", {"bat": "hoho"}
         )
     ]
     self._assert_attrs(opts, {"foo": "bar", "bat": "hoho"})
예제 #4
0
 def test_unbound_opt_only_adds_to_strat(self):
     opts = [
         strategy_options._UnboundLoad().some_col_opt_strategy(
             "name", {"bat": "hoho"}
         ),
         strategy_options._UnboundLoad().some_col_opt_only(
             "name", {"foo": "bar"}
         ),
     ]
     self._assert_attrs(opts, {"foo": "bar", "bat": "hoho"})
예제 #5
0
 def test_single_opt_only(self):
     opt = strategy_options._UnboundLoad().some_col_opt_only(
         "name", {"foo": "bar"})
     self._assert_attrs([opt], {"foo": "bar"})
예제 #6
0
 def test_single_opt_only(self):
     opt = strategy_options._UnboundLoad().some_col_opt_only(
         "name", {"foo": "bar"}
     )
     self._assert_attrs([opt], {"foo": "bar"})
예제 #7
0
def raiseload_col(*attrs):
    return _UnboundLoad().raiseload_col(*attrs)
예제 #8
0
def selectinquery(relationship, alter_query, cache_key=None):
    return _UnboundLoad.selectinquery(_UnboundLoad(), relationship,
                                      alter_query, cache_key)
예제 #9
0
def nplus1loader(*attrs, nested=True):
    return _UnboundLoad().nplus1loader(*attrs, nested=nested)
예제 #10
0
def default_columns(model):
    return _UnboundLoad().default_columns(model)