Integer() public static method

public static Integer ( ) : NumericType
return NumericType
Example #1
0
        public void OnTableCompositeCreate(IQuery systemQuery)
        {
            var tableInfo = new TableInfo(TypeManager.TypeTableName);

            tableInfo.AddColumn("id", PrimitiveTypes.Integer());
            tableInfo.AddColumn("schema", PrimitiveTypes.String(), true);
            tableInfo.AddColumn("name", PrimitiveTypes.String(), true);
            tableInfo.AddColumn("parent", PrimitiveTypes.String());
            tableInfo.AddColumn("sealed", PrimitiveTypes.Boolean());
            tableInfo.AddColumn("abstract", PrimitiveTypes.Boolean());
            tableInfo.AddColumn("owner", PrimitiveTypes.String());
            systemQuery.Access().CreateTable(tableInfo);

            tableInfo = new TableInfo(TypeManager.TypeMemberTableName);
            tableInfo.AddColumn("type_id", PrimitiveTypes.Integer());
            tableInfo.AddColumn("name", PrimitiveTypes.String(), true);
            tableInfo.AddColumn("type", PrimitiveTypes.String());
            systemQuery.Access().CreateTable(tableInfo);

            systemQuery.Access().AddPrimaryKey(TypeManager.TypeTableName, new[] { "id" }, "PK_TYPE");
            systemQuery.Access().AddForeignKey(TypeManager.TypeMemberTableName, new[] { "type_id" }, TypeManager.TypeTableName, new[] { "id" }, ForeignKeyAction.Cascade, ForeignKeyAction.Cascade, "FK_MEMBER_TYPE");
        }
        private static void OnCompositeCreate(IQuery systemQuery)
        {
            systemQuery.Access().CreateTable(table => table
                                             .Named(TypeManager.TypeTableName)
                                             .WithColumn("id", PrimitiveTypes.Integer())
                                             .WithColumn("schema", PrimitiveTypes.String())
                                             .WithColumn("name", PrimitiveTypes.String())
                                             .WithColumn("parent", PrimitiveTypes.String())
                                             .WithColumn("sealed", PrimitiveTypes.Boolean())
                                             .WithColumn("abstract", PrimitiveTypes.Boolean())
                                             .WithColumn("owner", PrimitiveTypes.String()));

            systemQuery.Access().CreateTable(table => table
                                             .Named(TypeManager.TypeMemberTableName)
                                             .WithColumn("type_id", PrimitiveTypes.Integer())
                                             .WithColumn("name", PrimitiveTypes.String())
                                             .WithColumn("type", PrimitiveTypes.String()));

            systemQuery.Access().AddPrimaryKey(TypeManager.TypeTableName, new[] { "id" }, "PK_TYPE");
            systemQuery.Access()
            .AddForeignKey(TypeManager.TypeMemberTableName, new[] { "type_id" }, TypeManager.TypeTableName, new[] { "id" },
                           ForeignKeyAction.Cascade, ForeignKeyAction.Cascade, "FK_MEMBER_TYPE");
        }