'Create a retention policy for a database.
:param name: the name of the new retention policy
:type name: str
:param duration: the duration of the new retention policy.
Durations such as 1h, 90m, 12h, 7d, and 4w, are all supported
and mean 1 hour, 90 minutes, 12 hours, 7 day, and 4 weeks,
respectively. For infinite retention - meaning the data will
never be deleted - use \'INF\' for duration.
The minimum retention period is 1 hour.
:type duration: str
:param replication: the replication of the retention policy
:type replication: str
:param database: the database for which the retention policy is
created. Defaults to current client\'s database
:type database: str
:param default: whether or not to set the policy as default
:type default: bool'

def create_retention_policy(self, name, duration, replication, database=None, default=False):

    query_string = u'CREATE    RETENTION    POLICY    {0}    ON    {1}    DURATION    {2}    REPLICATION    {3}'.format(quote_ident(name), quote_ident((database or self._database)), duration, replication)
    if (default is True):
        query_string += u'    DEFAULT'
    self.query(query_string)
