예제 #1
0
        public string GetSqlTypeForColum(StaticDB.DBType sdbType)
        {
            var result = sdbType switch
            {
                StaticDB.DBType.Byte => "smallint",
                StaticDB.DBType.UShort => "integer",
                StaticDB.DBType.UInt => "bigint",
                StaticDB.DBType.ULong => "bigint",
                StaticDB.DBType.SByte => "smallint",
                StaticDB.DBType.Short => "smallint",
                StaticDB.DBType.Int => "integer",
                StaticDB.DBType.Long => "bigint",
                StaticDB.DBType.Float => "real",
                StaticDB.DBType.Double => "double precision",
                StaticDB.DBType.String => "varchar",
                StaticDB.DBType.Vector2 => "vector2",
                StaticDB.DBType.Vector3 => "vector3",
                StaticDB.DBType.Vector4 => "vector4",
                StaticDB.DBType.Matrix4x4 => "Matrix4x4",
                StaticDB.DBType.Blob => "bytea",
                StaticDB.DBType.Box3 => "box3",
                StaticDB.DBType.Vector2Array => "vector2[]",
                StaticDB.DBType.Vector3Array => "vector3[]",
                StaticDB.DBType.Vector4Array => "vector4[]",
                StaticDB.DBType.AsciiChar => "character",
                StaticDB.DBType.ByteArray => "bytea",
                StaticDB.DBType.UShortArray => "integer[]",
                StaticDB.DBType.UIntArray => "bigint]",
                StaticDB.DBType.HalfMatrix4x3 => "halfmatrix4x3",
                StaticDB.DBType.Half => "real",
                _ => ""
            };

            return(result);
        }
예제 #2
0
        public static bool IsCustomType(StaticDB.DBType dbType)
        {
            var result = dbType == StaticDB.DBType.Vector2 ||
                         dbType == StaticDB.DBType.Vector3 ||
                         dbType == StaticDB.DBType.Vector4 ||
                         dbType == StaticDB.DBType.Matrix4x4 ||
                         dbType == StaticDB.DBType.HalfMatrix4x3 ||
                         dbType == StaticDB.DBType.Box3;

            return(result);
        }
예제 #3
0
        public static bool IsArrayType(StaticDB.DBType dbType)
        {
            var result = dbType == StaticDB.DBType.Vector2Array ||
                         dbType == StaticDB.DBType.Vector3Array ||
                         dbType == StaticDB.DBType.Vector4Array ||
                         dbType == StaticDB.DBType.ByteArray ||
                         dbType == StaticDB.DBType.UShortArray ||
                         dbType == StaticDB.DBType.Blob ||
                         dbType == StaticDB.DBType.UIntArray;

            return(result);
        }
예제 #4
0
        public static bool IsBasicType(StaticDB.DBType dbType)
        {
            var result = dbType == StaticDB.DBType.Byte ||
                         dbType == StaticDB.DBType.UShort ||
                         dbType == StaticDB.DBType.UInt ||
                         dbType == StaticDB.DBType.ULong ||
                         dbType == StaticDB.DBType.SByte ||
                         dbType == StaticDB.DBType.Short ||
                         dbType == StaticDB.DBType.Int ||
                         dbType == StaticDB.DBType.Long ||
                         dbType == StaticDB.DBType.Float ||
                         dbType == StaticDB.DBType.Double ||
                         dbType == StaticDB.DBType.String ||
                         dbType == StaticDB.DBType.AsciiChar ||
                         dbType == StaticDB.DBType.Half;

            return(result);
        }