Skip to content

Commit

Permalink
Constants length (DNET-518).
Browse files Browse the repository at this point in the history
  • Loading branch information
cincuranet committed Aug 27, 2013
1 parent 61091e9 commit afcaaf0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NETProvider/source/FirebirdSql/Data/Entity/SqlGenerator.cs
Expand Up @@ -865,6 +865,8 @@ public override ISqlFragment Visit(DbConstantExpression e)

case PrimitiveTypeKind.String:
bool isUnicode = MetadataHelpers.GetFacetValueOrDefault<bool>(e.ResultType, MetadataHelpers.UnicodeFacetName, true);
// constant is always considered Unicode
isUnicode = true;
int length =
MetadataHelpers.GetFacetValueOrDefault<int?>(e.ResultType, MetadataHelpers.MaxLengthFacetName, null)
?? (isUnicode ? FbProviderManifest.UnicodeVarcharMaxSize : FbProviderManifest.AsciiVarcharMaxSize);
Expand Down

0 comments on commit afcaaf0

Please sign in to comment.