Module: Timescaledb::Database::ChunkStatements

Included in:
Timescaledb::Database
Defined in:
lib/timescaledb/database/chunk_statements.rb

Instance Method Summary collapse

Instance Method Details

#compress_chunk_sql(chunk_name) ⇒ String

Returns The compress_chunk SQL statement.

Parameters:

  • chunk_name (String)

    The name of the chunk to be compressed

Returns:

  • (String)

    The compress_chunk SQL statement

See Also:



8
9
10
# File 'lib/timescaledb/database/chunk_statements.rb', line 8

def compress_chunk_sql(chunk_name)
  "SELECT compress_chunk(#{quote(chunk_name)});"
end

#decompress_chunk_sql(chunk_name) ⇒ String

Returns The decompress_chunk SQL statement.

Parameters:

  • chunk_name (String)

    The name of the chunk to be decompressed

Returns:

  • (String)

    The decompress_chunk SQL statement

See Also:



16
17
18
# File 'lib/timescaledb/database/chunk_statements.rb', line 16

def decompress_chunk_sql(chunk_name)
  "SELECT decompress_chunk(#{quote(chunk_name)});"
end