/// <summary>
/// Adds the singular rule.
/// </summary>
/// <param name="rule">The rule.</param>
/// <param name="replacement">The replacement.</param>
private static void AddSingularRule(string rule, string replacement) {
//_singulars.Add(new InflectorRule(rule, replacement));
}
mysql:
public Column PK
{
get
{
if(this.Columns.Count>1)
{
return this.Columns[0];
}
else
{
return this.Columns.SingleOrDefault(x=>x.IsPK);
}
}
}
public static bool Exists(object primaryKey) { return repo.Exists<T>(primaryKey); }
public static bool Exists(string sql, params object[] args) { return repo.Exists<T>(sql, args); }
public static bool Exists(Sql sql) { return repo.Exists<T>(sql); }
OracleSchemaReader修改
//col.PropertyType=GetPropertyType(rdr["DataType"].ToString(), (rdr["DataType"] == DBNull.Value ? null : rdr["DataType"].ToString()));
col.PropertyType=GetPropertyType(rdr["DataType"].ToString(), (rdr["DATASCALE"] == DBNull.Value ? "" : rdr["DATASCALE"].ToString()));
//col.IsNullable=rdr["IsNullable"].ToString()=="YES";
col.IsNullable=rdr["IsNullable"].ToString()=="Y";
col.IsAutoIncrement=true;
if (sqlType.ToLower() == "number" && dataScale == "0")
return "int";
//修改
//cmd.GetType().GetProperty("BindByName").SetValue(cmd, true, null);
PropertyInfo bindByNameInfo = cmd.GetType().GetProperty("BindByName");
//修改
tbl.SequenceName=tbl.Name+"_SEQUENCE";