Memory Leaks

This commit is contained in:
grzegorz.russek
2014-11-27 14:12:04 +00:00
parent 257cb158f4
commit efb03643d1
15 changed files with 374 additions and 57 deletions

View File

@@ -1901,8 +1901,12 @@ namespace DynamORM
Dictionary<string, DynamicSchemaColumn> schema = null;
if (mapper != null)
{
tableName = mapper.Table == null || string.IsNullOrEmpty(mapper.Table.Name) ?
mapper.Type.Name : mapper.Table.Name;
owner = mapper.Table == null || string.IsNullOrEmpty(mapper.Table.Owner) ?
null : mapper.Table.Owner;
}
bool databaseSchemaSupport = !string.IsNullOrEmpty(tableName) &&
(Options & DynamicDatabaseOptions.SupportSchema) == DynamicDatabaseOptions.SupportSchema;
@@ -4052,7 +4056,7 @@ namespace DynamORM
Dictionary<string, DynamicSchemaColumn> schema = null;
schema = Database.GetSchema(TableType) ??
Database.GetSchema(TableName);
Database.GetSchema(TableName, OwnerName);
#region Fill currrent table schema
@@ -4437,7 +4441,7 @@ namespace DynamORM
HandleTypeArgument<DynamicInsertQueryBuilder>(null, info, ref types, builder, 0);
if (!string.IsNullOrEmpty(this.TableName) && builder.Tables.Count == 0)
builder.Table(this.TableName, this.Schema);
builder.Table(string.IsNullOrEmpty(this.OwnerName) ? this.TableName : string.Format("{0}.{1}", this.OwnerName, this.TableName), this.Schema);
// loop the named args - see if we have order, columns and constraints
if (info.ArgumentNames.Count > 0)
@@ -4484,7 +4488,7 @@ namespace DynamORM
HandleTypeArgument<DynamicUpdateQueryBuilder>(null, info, ref types, builder, 0);
if (!string.IsNullOrEmpty(this.TableName) && builder.Tables.Count == 0)
builder.Table(this.TableName, this.Schema);
builder.Table(string.IsNullOrEmpty(this.OwnerName) ? this.TableName : string.Format("{0}.{1}", this.OwnerName, this.TableName), this.Schema);
// loop the named args - see if we have order, columns and constraints
if (info.ArgumentNames.Count > 0)
@@ -4539,7 +4543,7 @@ namespace DynamORM
HandleTypeArgument<DynamicDeleteQueryBuilder>(null, info, ref types, builder, 0);
if (!string.IsNullOrEmpty(this.TableName) && builder.Tables.Count == 0)
builder.Table(this.TableName, this.Schema);
builder.Table(string.IsNullOrEmpty(this.OwnerName) ? this.TableName : string.Format("{0}.{1}", this.OwnerName, this.TableName), this.Schema);
// loop the named args - see if we have order, columns and constraints
if (info.ArgumentNames.Count > 0)
@@ -4591,7 +4595,7 @@ namespace DynamORM
HandleTypeArgument<DynamicSelectQueryBuilder>(null, info, ref types, builder, 0);
if (!string.IsNullOrEmpty(this.TableName) && builder.Tables.Count == 0)
builder.From(x => this.TableName);
builder.From(x => string.IsNullOrEmpty(this.OwnerName) ? this.TableName : string.Format("{0}.{1}", this.OwnerName, this.TableName));
// loop the named args - see if we have order, columns and constraints
if (info.ArgumentNames.Count > 0)