class DB::Postgres::Native::Strings

Attributes

array[R]

Public Class Methods

new(values) click to toggle source
# File lib/db/postgres/native/connection.rb, line 29
def initialize(values)
        @array = FFI::MemoryPointer.new(:pointer, values.size + 1)
        @pointers = values.map do |value|
                FFI::MemoryPointer.from_string(value.to_s)
        end
        @array.write_array_of_pointer(@pointers)
end