public SqlString Generate() { if (_sql == null) { var gen = new SqlGenerator(_sfi, new CommonTreeNodeStream(_ast)); try { gen.statement(); _sql = gen.GetSQL(); if (log.IsDebugEnabled) { log.Debug("SQL: " + _sql); } } finally { gen.ParseErrorHandler.ThrowQueryException(); } _parameters = gen.GetCollectedParameters(); } return(_sql); }
public SqlString Generate() { if (_sql == null) { var gen = new SqlGenerator(_sfi, new CommonTreeNodeStream(_ast)); try { gen.statement(); _sql = gen.GetSQL(); if (log.IsDebugEnabled) { log.Debug("SQL: " + _sql); } } finally { gen.ParseErrorHandler.ThrowQueryException(); } _parameters = gen.GetCollectedParameters(); } return _sql; }