mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 17:20:49 +08:00 
			
		
		
		
	- 增加 fsql.Insert(Dictionary<string, object>) 无实体类插入方法;#481
This commit is contained in:
		@@ -55,10 +55,10 @@ namespace FreeSql.PostgreSQL
 | 
			
		||||
        NpgsqlDbType GetNpgsqlDbType(DbColumnInfo column)
 | 
			
		||||
        {
 | 
			
		||||
            var dbtype = column.DbTypeText;
 | 
			
		||||
            var isarray = dbtype.EndsWith("[]");
 | 
			
		||||
            var isarray = dbtype?.EndsWith("[]") == true;
 | 
			
		||||
            if (isarray) dbtype = dbtype.Remove(dbtype.Length - 2);
 | 
			
		||||
            NpgsqlDbType ret = NpgsqlDbType.Unknown;
 | 
			
		||||
            switch (dbtype.ToLower().TrimStart('_'))
 | 
			
		||||
            switch (dbtype?.ToLower().TrimStart('_'))
 | 
			
		||||
            {
 | 
			
		||||
                case "int2": ret = NpgsqlDbType.Smallint; break;
 | 
			
		||||
                case "int4": ret = NpgsqlDbType.Integer; break;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user