Skip to content

Conversation

@akostadinov
Copy link
Contributor

@akostadinov akostadinov commented Jan 28, 2022

fixes #2239

@akostadinov akostadinov force-pushed the oci8 branch 3 times, most recently from c8b3718 to 8e98310 Compare February 2, 2022 13:45
Comment on lines +30 to +43

def cached_column_for(attr)
return unless Arel::Attributes::Attribute === attr

table = attr.relation.table_name
return unless schema_cache.columns_hash?(table)

column = attr.name.to_s
schema_cache.columns_hash(table)[column]
end

def schema_cache
@connection.schema_cache
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two methods are mostly logic from arel 7.1.4 with the difference that we only obtain cached columns. Otherwise we go into troubles trying to build the cache.

@yahonda yahonda merged commit ef67a9f into rsim:master Feb 23, 2022
@pandu-49
Copy link

@yahonda
Comparing nil against text fields is failing to fetch data as oracle_enhanced started considering text columns as CLOBs.

Example:
Model.where(text_column: nil)

This supposed to fire a query as SELECT * FROM models WHERE TEXT_COLUMN IS NULL;. However, in the latest version this is comparing using DBMS_LOB comparision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Matching for equality of CLOB fields fails

3 participants