Sha256: 4eaf1aee3ba35e2d3396742943315b6f10d19c3d905ff2cfe280423e9b067df6
Contents?: true
Size: 474 Bytes
Versions: 16
Compression:
Stored size: 474 Bytes
Contents
require 'spec_helper' RSpec.describe ROM::SQL::Schema, '#prefix', :postgres, seeds: false do include_context 'users' before do conf.relation(:users) do schema(infer: true) end end it 'auto-projects a relation with renamed columns using provided prefix' do expect(relations[:users].schema.prefix(:user).(relations[:users]).dataset.sql) .to eql('SELECT "id" AS "user_id", "name" AS "user_name" FROM "users" ORDER BY "users"."id"') end end
Version data entries
16 entries across 16 versions & 1 rubygems