Package com.alibaba.cobar.client.router.support

Examples of com.alibaba.cobar.client.router.support.IBatisRoutingFact


    }
   
    public void testSqlActionShardingRuleWithSimpleContextObjectType(){
        IBatisSqlActionShardingRule r = new IBatisSqlActionShardingRule(DEFAULT_TYPE_PATTEN,
                "shard1", "$ROOT.startsWith(\"J\")");
        IBatisRoutingFact fact = new IBatisRoutingFact(
                "com.alibaba.cobar.client.entity.Tweet.create", "Jack");
        assertTrue(r.isDefinedAt(fact));
       
        r = new IBatisSqlActionShardingRule(DEFAULT_TYPE_PATTEN,
                "shard1", "startsWith(\"J\")");
        assertTrue(r.isDefinedAt(fact));
       
        fact = new IBatisRoutingFact(
                "com.alibaba.cobar.client.entity.Tweet.create", "Amanda");
        assertFalse(r.isDefinedAt(fact));
       
       
    }
View Full Code Here

TOP

Related Classes of com.alibaba.cobar.client.router.support.IBatisRoutingFact

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.