Method: InfluxDB::Query::RetentionPolicy#create_retention_policy

Defined in:
lib/influxdb/query/retention_policy.rb

#create_retention_policy(name, database, duration, replication, default = false) ⇒ Object



4
5
6
7
8
# File 'lib/influxdb/query/retention_policy.rb', line 4

def create_retention_policy(name, database, duration, replication, default = false)
  execute(
    "CREATE RETENTION POLICY \"#{name}\" ON #{database} "\
    "DURATION #{duration} REPLICATION #{replication}#{default ? ' DEFAULT' : ''}")
end