public SqlParameter(SqlStatement sqlStatement, object value, DbType dbType, string name) { this.Parent = sqlStatement ; this.value = value; this.dbType = dbType; this.name = name; }
public SqlWhereClause(SqlStatement sqlStatement) : base(sqlStatement) { }
public SqlHavingClause(SqlStatement sqlStatement) : base(sqlStatement) { }
public SqlOrderByClause(SqlStatement sqlStatement) : base(sqlStatement) { }
public SqlFromClause(SqlStatement sqlStatement) : base(sqlStatement) { }
protected override string GenerateSql(SqlStatement statement) { ISqlVisitor visitor = GetVisitor(); statement.Accept(visitor); return visitor.Sql; }
public SqlIntoClause(SqlStatement sqlStatement) : base(sqlStatement) { }
protected virtual SqlParameter AddSqlParameter(SqlStatement sqlStatement, IList parameters, string paramName, object obj, IPropertyMap propertyMap, object value, IColumnMap columnMap) { return AddSqlParameter(sqlStatement, parameters, paramName, obj, propertyMap, value, columnMap, false); }
protected virtual SqlParameter AddSqlParameter(SqlStatement sqlStatement, IList parameters, string paramName, object obj, IPropertyMap propertyMap, object value, IColumnMap columnMap, bool noNullStatusCheck) { DbType dataType = columnMap.DataType; IPropertyMap idPropertyMap; IObjectManager om = m_SqlEngineManager.Context.ObjectManager; IClassMap refClassMap; IColumnMap forColMap; IClassMap realRefClassMap; IQueryParameter param = new QueryParameter(paramName, columnMap.DataType) ; parameters.Add(param); SqlParameter sqlParameter = sqlStatement.AddSqlParameter(paramName, dataType); if (Convert.IsDBNull(value) || value == null) { param.Value = DBNull.Value; } if (!(noNullStatusCheck)) { if (om.GetNullValueStatus(obj, propertyMap.Name)) { param.Value = DBNull.Value; sqlParameter.Value = DBNull.Value; return sqlParameter; } } if (propertyMap != null) { if (!(propertyMap.ReferenceType == ReferenceType.None)) { if (value == null) { param.Value = DBNull.Value; sqlParameter.Value = DBNull.Value; return sqlParameter; } else { if (om.GetObjectStatus(value) == ObjectStatus.UpForCreation) { param.Value = DBNull.Value; sqlParameter.Value = DBNull.Value; return sqlParameter; } else { refClassMap = propertyMap.MustGetReferencedClassMap(); forColMap = columnMap.MustGetPrimaryKeyColumnMap(); dataType = forColMap.DataType; if (refClassMap.GetTypeColumnMap() != null && refClassMap.GetTypeColumnMap() == forColMap) { realRefClassMap = refClassMap.DomainMap.MustGetClassMap(value.GetType()); value = realRefClassMap.TypeValue; } else { idPropertyMap = refClassMap.MustGetPropertyMapForColumnMap(forColMap); value = om.GetPropertyValue(value, idPropertyMap.Name); } } } } } param.Value = value; sqlParameter.Value = value; return sqlParameter; }
protected SqlClause(SqlStatement sqlStatement) { this.Parent = sqlStatement; }
public SqlDatabase(SqlStatement sqlStatement, string name) { this.Parent = sqlStatement; this.name = name; }
public SqlDatabase(SqlStatement sqlStatement, ISourceMap sourceMap) { this.Parent = sqlStatement; this.sourceMap = sourceMap; }
public SqlParameter(SqlStatement sqlStatement, object value, DbType dbType) : this(sqlStatement, value, dbType, "") { }
public SqlParameter(SqlStatement sqlStatement, string name) : this(sqlStatement, null, DbType.AnsiString, "") { }
public SqlDatabase(SqlStatement sqlStatement,string name) { this.Parent = sqlStatement; this.name = name; }
public SqlSelectClause(SqlStatement sqlStatement) : base(sqlStatement) { }
public SqlDefaultAliasGenerator(SqlStatement sqlStatement) { this.sqlStatement = sqlStatement; }