Wraps any query statement and attaches a target host, making it usable in a targeted LBP without modifying the user's statement.
| 1053 | |
| 1054 | # TODO remove next major since we can target using the `host` attribute of session.execute |
| 1055 | class HostTargetingStatement(object): |
| 1056 | """ |
| 1057 | Wraps any query statement and attaches a target host, making |
| 1058 | it usable in a targeted LBP without modifying the user's statement. |
| 1059 | """ |
| 1060 | def __init__(self, inner_statement, target_host): |
| 1061 | self.__class__ = type(inner_statement.__class__.__name__, |
| 1062 | (self.__class__, inner_statement.__class__), |
| 1063 | {}) |
| 1064 | self.__dict__ = inner_statement.__dict__ |
| 1065 | self.target_host = target_host |
no outgoing calls
no test coverage detected