Support inferring custom-defined types
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by tracing how PostgreSQL column metadata is inspected and how the displayed :type value is inferred for the custom inventory_item column. The work is done when custom-defined types no longer produce a nil type and the expected behavior is covered by an appropriate test.
Written by the indexing model from the issue text.
Description
In PG you can define custom column types, ie like that:
CREATE TYPE inventory_item AS (
name text,
supplier_id integer,
price numeric
);
then specify a column like that:
column :composite1, 'inventory_item', default: Sequel.literal("ROW('fuzzy dice', 42, 1.99)")
This is what Sequel gives us about that column:
[:composite1, {:oid=>6663255, :db_type=>"inventory_item", :default=>"ROW('fuzzy dice'::text, 42, 1.99)", :allow_null=>true, :primary_key=>false, :type=>nil, :ruby_default=>nil}]
Refs hanami/model#370
- Dominant language
- Ruby
- Stars
- 220
- Forks
- 97
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rom-rb/rom-sql
-
bug help wanted
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
bug help wanted
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
bug help wanted
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
bug help wanted
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
bug help wanted
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Similar issues
-
バグ
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
voxpupuli/puppet-epel#186 · 1 comment ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) OpenBug Frontend
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
TheOdinProject/curriculum#31402 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100