Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* AbstractSQLStore was incorrectly putting Literal::Language represen…

…tation rather than value in database.
  • Loading branch information...
commit 64fe0d38c3a8f429efd84de03c2c9a16066209b4 1 parent f07a1fd
@gkellogg authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/rdf_context/store/abstract_sql_store.rb
View
8 lib/rdf_context/store/abstract_sql_store.rb
@@ -691,8 +691,8 @@ def buildLiteralTripleSQLCommand(triple,context)
normalizeTerm(triple.object),
normalizeTerm(context),
triplePattern,
- (triple.object.is_a?(Literal) ? triple.object.lang : NULL),
- (triple.object.is_a?(Literal) ? triple.object.encoding.value.to_s : NULL),
+ (triple.object.is_a?(Literal) && triple.object.lang ? triple.object.lang.to_s : nil),
+ (triple.object.is_a?(Literal) && triple.object.encoding ? triple.object.encoding.value.to_s : nil),
]
end
@@ -709,8 +709,8 @@ def buildTripleSQLCommand(triple,context,quoted)
normalizeTerm(triple.object),
normalizeTerm(context),
triplePattern,
- (triple.object.is_a?(Literal) ? triple.object.lang : NULL),
- (triple.object.is_a?(Literal) ? triple.object.encoding.value.to_s : NULL),
+ (triple.object.is_a?(Literal) && triple.object.lang ? triple.object.lang.to_s : nil),
+ (triple.object.is_a?(Literal) && triple.object.encoding ? triple.object.encoding.value.to_s : nil),
]
else
[
Please sign in to comment.
Something went wrong with that request. Please try again.