Sha256: 2bd7e9777f3f0f751af547349176cc079741773647eec5c38b6c43a6e2c2ef31
Contents?: true
Size: 384 Bytes
Versions: 61
Compression:
Stored size: 384 Bytes
Contents
# private module Simple::SQL::Helpers::Encoder extend self def encode_args(connection, args) args.map { |arg| encode_arg(connection, arg) } end def encode_arg(connection, arg) return arg unless arg.is_a?(Array) if arg.first.is_a?(String) "{#{arg.map { |a| "\"#{connection.escape(a)}\"" }.join(',')}}" else "{#{arg.join(',')}}" end end end
Version data entries
61 entries across 61 versions & 1 rubygems