• PetaPoco.Core.ttinclude修改


    /// <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";

  • 相关阅读:
    cpanel 定时运行sh/php
    zencart 后台目录产品黄色icon_yellow_on.gif 解决方案
    字符串编码---hash函数的应用
    Tiling_easy version(填2 x N的格子的种类)
    n行m列的网格中含有的矩形数
    Openstack
    Docker
    Tornado模块
    LAMP应用部署
    数据库管理
  • 原文地址:https://www.cnblogs.com/zwei1121/p/3962744.html
Copyright © 2020-2023  润新知