This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dbType":"mysql", | |
"idleTimeout":60000, | |
"initSqls":["set names utf8"], | |
"initSqlsGetConnection":true, | |
"instanceType":"READ_WRITE", | |
"maxCon":1000, | |
"maxConnectTimeout":30000, | |
"maxRetryCount":5, | |
"minCon":1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//package io.mycat.drdsrunner; | |
// | |
//import com.alibaba.druid.sql.SQLUtils; | |
//import com.alibaba.druid.sql.ast.SQLStatement; | |
//import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlInsertStatement; | |
//import io.mycat.DrdsRunner; | |
//import io.mycat.MetaClusterCurrent; | |
//import io.mycat.MetadataManager; | |
//import io.mycat.MycatCore; | |
//import io.mycat.assemble.MycatTest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (C) <2021> <chen junwen> | |
* <p> | |
* This program is free software: you can redistribute it and/or modify it under the terms of the | |
* GNU General Public License as published by the Free Software Foundation, either version 3 of the | |
* License, or (at your option) any later version. | |
* <p> | |
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without | |
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
* General Public License for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.mycat.calcite.spm; | |
import com.alibaba.druid.DbType; | |
import com.alibaba.druid.sql.SQLUtils; | |
import com.alibaba.druid.sql.ast.SQLStatement; | |
import com.google.common.cache.CacheBuilder; | |
import com.google.common.cache.CacheLoader; | |
import com.google.common.cache.LoadingCache; | |
import io.mycat.DrdsRunner; | |
import io.mycat.calcite.sqlfunction.stringfunction.FieldFunction; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.mycat.calcite.spm; | |
import com.alibaba.druid.DbType; | |
import com.alibaba.druid.sql.SQLUtils; | |
import com.alibaba.druid.sql.ast.SQLStatement; | |
import com.google.common.cache.CacheBuilder; | |
import com.google.common.cache.CacheLoader; | |
import com.google.common.cache.LoadingCache; | |
import io.mycat.DrdsRunner; | |
import io.mycat.calcite.sqlfunction.stringfunction.FieldFunction; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.mycat.drdsrunner; | |
import io.mycat.DataNode; | |
import io.mycat.calcite.table.ShardingTable; | |
import io.mycat.router.CustomRuleFunction; | |
import org.apache.calcite.rex.RexDynamicParam; | |
import org.apache.calcite.rex.RexLiteral; | |
import org.apache.calcite.rex.RexNode; | |
import java.util.Collections; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (C) <2020> <chen junwen> | |
* <p> | |
* This program is free software: you can redistribute it and/or modify it under the terms of the | |
* GNU General Public License as published by the Free Software Foundation, either version 3 of the | |
* License, or (at your option) any later version. | |
* <p> | |
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without | |
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
* General Public License for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.mycat.calcite.rewriter; | |
import io.mycat.calcite.logical.MycatView; | |
import org.apache.calcite.plan.Contexts; | |
import org.apache.calcite.plan.RelOptRuleCall; | |
import org.apache.calcite.plan.RelRule; | |
import org.apache.calcite.rel.core.Join; | |
import org.apache.calcite.rel.core.RelFactories; | |
import org.apache.calcite.rel.logical.LogicalJoin; | |
import org.apache.calcite.rel.type.RelDataType; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (C) <2020> <chen junwen> | |
* <p> | |
* This program is free software: you can redistribute it and/or modify it under the terms of the | |
* GNU General Public License as published by the Free Software Foundation, either version 3 of the | |
* License, or (at your option) any later version. | |
* <p> | |
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without | |
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
* General Public License for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (C) <2020> <chen junwen> | |
* <p> | |
* This program is free software: you can redistribute it and/or modify it under the terms of the | |
* GNU General Public License as published by the Free Software Foundation, either version 3 of the | |
* License, or (at your option) any later version. | |
* <p> | |
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without | |
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
* General Public License for more details. |