public void ProcessBoolean(IASTNode constant) { // TODO: something much better - look at the type of the other expression! // TODO: Have comparisonExpression and/or arithmeticExpression rules complete the resolution of boolean nodes. string replacement; _walker.TokenReplacements.TryGetValue(constant.Text, out replacement); if ( replacement != null ) { constant.Text = replacement; } else { bool value = "true" == constant.Text.ToLowerInvariant(); Dialect.Dialect dialect = _walker.SessionFactoryHelper.Factory.Dialect; constant.Text = dialect.ToBooleanValueString(value); } }
public override string ObjectToSQLString(object value, Dialect.Dialect dialect) { return(dialect.ToBooleanValueString((bool)value)); }