当前位置: 首页>>代码示例>>C#>>正文


C# IQuery.Access方法代码示例

本文整理汇总了C#中IQuery.Access方法的典型用法代码示例。如果您正苦于以下问题:C# IQuery.Access方法的具体用法?C# IQuery.Access怎么用?C# IQuery.Access使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IQuery的用法示例。


在下文中一共展示了IQuery.Access方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Create

        private static void Create(IQuery systemQuery)
        {
            // SYSTEM.ROUTINE
            systemQuery.Access()
                .CreateTable(table => table
                    .Named(RoutineManager.RoutineTableName)
                    .WithColumn("id", PrimitiveTypes.Numeric())
                    .WithColumn("schema", PrimitiveTypes.String())
                    .WithColumn("name", PrimitiveTypes.String())
                    .WithColumn("type", PrimitiveTypes.String())
                    .WithColumn("location", PrimitiveTypes.String())
                    .WithColumn("body", PrimitiveTypes.Binary())
                    .WithColumn("return_type", PrimitiveTypes.String())
                    .WithColumn("username", PrimitiveTypes.String()));

            // SYSTEM.ROUTINE_PARAM
            systemQuery.Access().CreateTable(table => table
                .Named(RoutineManager.RoutineParameterTableName)
                .WithColumn("routine_id", PrimitiveTypes.Numeric())
                .WithColumn("arg_name", PrimitiveTypes.String())
                .WithColumn("arg_type", PrimitiveTypes.String())
                .WithColumn("arg_attrs", PrimitiveTypes.Numeric())
                .WithColumn("in_out", PrimitiveTypes.Integer())
                .WithColumn("offset", PrimitiveTypes.Integer()));
        }
开发者ID:deveel,项目名称:deveeldb,代码行数:25,代码来源:SystemBuilderExtensions.cs

示例2: OnTearDown

 protected override bool OnTearDown(string testName, IQuery query)
 {
     var tableName = ObjectName.Parse("APP.test_table");
     query.Access().DropAllTableConstraints(tableName);
     query.Access().DropObject(DbObjectType.Table, tableName);
     return true;
 }
开发者ID:deveel,项目名称:deveeldb,代码行数:7,代码来源:SelectBlobTests.cs

示例3: CreateSystemRoles

 private static void CreateSystemRoles(IQuery query)
 {
     query.Access().CreateRole(SystemRoles.SecureAccessRole);
     query.Access().CreateRole(SystemRoles.UserManagerRole);
     query.Access().CreateRole(SystemRoles.SchemaManagerRole);
     query.Access().CreateRole(SystemRoles.LockedRole);
 }
开发者ID:deveel,项目名称:deveeldb,代码行数:7,代码来源:SystemBuilderExtensions.cs

示例4: OnTearDown

        protected override bool OnTearDown(string testName, IQuery query)
        {
            var viewName = ObjectName.Parse("APP.text_view1");
            query.Access().DropObject(DbObjectType.View, viewName);

            query.Access().DropObject(DbObjectType.Table, ObjectName.Parse("APP.test_table"));
            return true;
        }
开发者ID:deveel,项目名称:deveeldb,代码行数:8,代码来源:CreateViewTests.cs

示例5: OnTearDown

 protected override bool OnTearDown(string testName, IQuery query)
 {
     var tableName = ObjectName.Parse("APP.test_table");
     query.Access().RevokeAllGrantsOn(DbObjectType.Table, tableName);
     query.Access().DropRole("test_role");
     query.Access().DeleteUser("test_user");
     query.Access().DropObject(DbObjectType.Table, tableName);
     return true;
 }
开发者ID:deveel,项目名称:deveeldb,代码行数:9,代码来源:RevokeTests.cs

示例6: OnSetUp

        protected override bool OnSetUp(string testName, IQuery query)
        {
            query.Access().CreateUser("test_user", "0123456789");
            query.Access().CreateRole("test_role1");
            query.Access().CreateRole("role2");

            if (testName == "Unlock")
                query.Access().SetUserStatus("test_user", UserStatus.Locked);
            return true;
        }
开发者ID:deveel,项目名称:deveeldb,代码行数:10,代码来源:AlterUserTests.cs

示例7: OnTearDown

        protected override bool OnTearDown(string testName, IQuery query)
        {
            query.Access().DeleteUser("test_user");
            query.Access().DropRole("test_role");

            var tableName1 = ObjectName.Parse("APP.test_table");
            var tableName2 = ObjectName.Parse("APP.test_table2");

            query.Access().DropAllTableConstraints(tableName1);
            query.Access().DropObject(DbObjectType.Table, tableName1);
            query.Access().DropObject(DbObjectType.Table, tableName2);
            return true;
        }
开发者ID:deveel,项目名称:deveeldb,代码行数:13,代码来源:GrantTests.cs

示例8: OnSetUp

        protected override bool OnSetUp(string testName, IQuery query)
        {
            var tableName = ObjectName.Parse("APP.test_table");

            query.Access().CreateTable(table => table
                .Named(tableName)
                .WithColumn("id", PrimitiveTypes.Integer()));

            query.Access().CreateUser("test_user", "0123456789");
            query.Access().GrantOnTable(tableName, "test_user", Privileges.Alter);

            query.Access().CreateRole("test_role");
            query.Access().AddUserToRole("test_user", "test_role");
            return true;
        }
开发者ID:deveel,项目名称:deveeldb,代码行数:15,代码来源:RevokeTests.cs

示例9: OnSetUp

 protected override bool OnSetUp(string testName, IQuery query)
 {
     var seqName = ObjectName.Parse("APP.seq1");
     query.Access().CreateObject(new SequenceInfo(seqName, new SqlNumber(0), new SqlNumber(1), new SqlNumber(0),
         new SqlNumber(Int16.MaxValue), 256));
     return true;
 }
开发者ID:deveel,项目名称:deveeldb,代码行数:7,代码来源:SelectSequenceTests.cs

示例10: CreateTable

        private void CreateTable(IQuery query)
        {
            var tableName = ObjectName.Parse("APP.test_table");
            query.Access().CreateTable(table => table
                .Named(tableName)
                .WithColumn(column => column
                    .Named("id")
                    .HavingType(PrimitiveTypes.Integer())
                    .WithDefault(SqlExpression.FunctionCall("UNIQUEKEY", new SqlExpression[] {
                        SqlExpression.Constant(tableName.FullName)
                    })))
                .WithColumn("a", PrimitiveTypes.Integer())
                .WithColumn("b", PrimitiveTypes.String()));

            query.Access().AddPrimaryKey(tableName, "id", "PK_TEST_TABLE");
        }
开发者ID:deveel,项目名称:deveeldb,代码行数:16,代码来源:DeleteCurrentTests.cs

示例11: CreateTable

 private void CreateTable(IQuery query)
 {
     query.Access().CreateTable(table => table
         .Named("APP.test_table")
         .WithColumn("a", PrimitiveTypes.Integer())
         .WithColumn("b", PrimitiveTypes.String()));
 }
开发者ID:deveel,项目名称:deveeldb,代码行数:7,代码来源:DbCommandBuilderTests.cs

示例12: InsertData

        private void InsertData(IQuery query)
        {
            var tableName = ObjectName.Parse("APP.persons");
            var table = query.Access().GetMutableTable(tableName);
            var row = table.NewRow();
            row["name"] = Field.String("Antonello Provenzano");
            row["age"] = Field.Integer(36);
            row.SetDefault(query);
            table.AddRow(row);

            row = table.NewRow();
            row["name"] = Field.String("Sebastiano Provenzano");
            row["age"] = Field.Integer(35);
            row.SetDefault(query);
            table.AddRow(row);

            row = table.NewRow();
            row["name"] = Field.String("Mart Rosmaa");
            row["age"] = Field.Integer(33);
            row.SetDefault(query);
            table.AddRow(row);

            row = table.NewRow();
            row["name"] = Field.String("Karl Inge Stensson");
            row["age"] = Field.Integer(54);
            row.SetDefault(query);
            table.AddRow(row);
        }
开发者ID:deveel,项目名称:deveeldb,代码行数:28,代码来源:CompositeSelectTests.cs

示例13: OnSetUp

 protected override bool OnSetUp(string testName, IQuery query)
 {
     var seqName = ObjectName.Parse("APP.seq1");
     query.Access().CreateObject(new SequenceInfo(seqName, SqlNumber.Zero, SqlNumber.One, SqlNumber.Zero,
         new SqlNumber(Int64.MaxValue), Int32.MaxValue));
     return true;
 }
开发者ID:deveel,项目名称:deveeldb,代码行数:7,代码来源:DropSequenceTests.cs

示例14: CreateFunction

 private void CreateFunction(IQuery query)
 {
     var functionName = ObjectName.Parse("APP.func1");
     var body = new PlSqlBlockStatement();
     body.Statements.Add(new ReturnStatement(SqlExpression.Constant(200)));
     var functionInfo = new PlSqlFunctionInfo(functionName, new RoutineParameter[0], PrimitiveTypes.Integer(), body);
     query.Access().CreateRoutine(functionInfo);
 }
开发者ID:deveel,项目名称:deveeldb,代码行数:8,代码来源:PlSqlFunctionTests.cs

示例15: OnSetUp

 protected override bool OnSetUp(string testName, IQuery query)
 {
     query.Access().CreateTable(table => table
         .Named("APP.test_table")
         .WithColumn("a", PrimitiveTypes.Integer())
         .WithColumn("b", PrimitiveTypes.String()));
     return true;
 }
开发者ID:deveel,项目名称:deveeldb,代码行数:8,代码来源:CreateViewTests.cs


注:本文中的IQuery.Access方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。