Dynamically register and switch data sources during runtime, automatically generate SQL (DDL/DML/DQL), read and write metadata, and compare database structure differences. Adapt to over 100 relational/non relational databases. Commonly used for low-level support in dynamic scenarios, such as data middleware, visualization, low code backend, workflow, custom forms, heterogeneous database migration and synchronization, IoT vehicle data processing, data cleaning, runtime custom reports/query conditions/data structures, crawling insect data parsing, etc
Quick test refer【anyline-simple-clear】
Syntax refer【anyline-simple】
any questions, please contact skype: [email protected]
QQ群(86020680) | 微信群 | 过期请联系管理员 |
regardless of bugs, doubts, requirements, source code, competitors |
The core of AnyLine is a runtime oriented metadata dynamic relationship mapping primarily used for
- Dynamically register and switch data sources
- Read and write metadata
- Compare database structure differences
- Generate dynamic SQL and combine dynamic query conditions
- Complex result set operations
A natural low code, dynamic form, and dynamic data source underlying tool
Adapt to various relational and non relational databases (as well as various domestic niche databases)
Commonly used for low-level support in dynamic structural scenarios, appearing as an SQL parsing engine or adapter
Such as: data center, visualization, low code, SAAS, custom forms, heterogeneous database migration and synchronization, IoT vehicle networking data processing
Conditions/data structures, crawler data parsing, etc.
Reference [Applicable Scenarios】
Note that the data source here is not a master-slave relationship, but multiple completely unrelated data sources.
DataSource ds_sso = new DruidDataSource();
ds_sso.setUrl("jdbc:mysql://localhost:3306/sso");
ds_sso.setDriverClassName("com.mysql.cj.jdbc.Driver");
...
DataSourceHolder.reg("ds_sso", ds_sso);
OR
DataSourceHolder.reg("ds_sso", pool, driver, url, user, password);
DataSourceHolder.reg("ds_sso", Map<String, Object> params); //Corresponding properties of the connection pool k-v
//Query the SSO_USER table of the ds_Sso data source
DataSet set = ServiceProxy.service("ds_sso").querys("SSO_USER");
From static configuration file data source (if it is a Spring environment, it can be in Spring format)
#Default Data Source
anyline.datasource.type=com.zaxxer.hikari.HikariDataSource
anyline.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
anyline.datasource.url=jdbc:mysql://localhost:33306/simple
anyline.datasource.user-name=root
... more parameters
#Other data sources
anyline.datasource-list=crm,erp,sso,mg
anyline.datasource.crm.driver-class-name=com.mysql.cj.jdbc.Driver
anyline.datasource.crm.url=jdbc:mysql://localhost:33306/simple_crm
anyline.datasource.crm.username=root
anyline.datasource.erp.driver-class-name=com.mysql.cj.jdbc.Driver
anyline.datasource.erp.url=jdbc:mysql://localhost:33306/simple_erp
anyline.datasource.erp.username=root
DML
// If it is a web environment
service.querys("SSO_USER",
condition(true, "NAME:%name%", "TYPE:[type]", "[CODES]:code"));
//true Indicates the need for pagination, and conditions without parameter values are ignored by default
//SQL:
SELECT *
FROM SSO_USER
WHERE 1=1
AND NAME LIKE '%?%'
AND TYPE IN(?,?,?)
AND FIND_IN_SET(?, CODES)
LIMIT 5,10 //Generate different SQL statements based on specific database types
//User defined query conditions, low code scenarios generally require more complex query conditions
ConfigStore configs;
service.query("SSO_USER", configs);
//ConfigStore provides all SQL operations
//Sample code and instructions for SQL parameters for multi table, batch submission, custom SQL, and parsing XML definitions
Read and write metadata
@Autowired("anyline.service")
AnylineService service;
//Query the SSO_USER table structure of the default data source
Table table = serivce.metadata().table("SSO_USER");
LinkedHashMap<String, Column> columns = table.getColumns(); //columns of Table
LinkedHashMap<String, Constraint> constraints = table.getConstraints(); //constraints of table
List<String> ddls = table.getDdls(); //ddl for create table
//drop table and recreate
service.ddl().drop(table);
table = new Table("SSO_USER");
//The data type here is arbitrary, regardless of whether it is int8 or bigint, it will be converted to the correct type during execution
table.addColumn("ID", "BIGINT").autoIncrement(true).setPrimary(true).setComment("primary key");
table.addColumn("CODE", "VARCHAR(20)").setComment("code of user");
table.addColumn("NAME", "VARCHAR(20)").setComment("full name");
table.addColumn("AGE", "INT").setComment("age of user");
service.ddl().create(table);
//or service.ddl().save(table); //During execution, it will distinguish which columns need to be added and which columns need to be altered
Database transactions
//Because the method can switch data sources multiple times at any time, the annotation can no longer capture the current data source
//More transaction parameters can be obtained through the TransactionDefine parameter
TransactionState state = TransactionProxy.start("ds_sso");
//Operational data(insert update delete)
TransactionProxy.commit(state);
TransactionProxy.rollback(state);
MYSQL PostgreSQL ORACLE MSSQL MongoDB Redis ElasticSearch DB2 DM(武汉达梦数据库股份有限公司) GBase8a(天津南大通用数据技术股份有限公司) GBase8c(天津南大通用数据技术股份有限公司) GBase8s(天津南大通用数据技术股份有限公司) oscar SQLite Snowflake Cassandra MariaDB Splunk AzureSQL AmazonDynamoDB Databricks Hive Access GoogleBigQuery HighGo(瀚高基础软件股份有限公司) MSSQL2000 Neo4j PolarDB(阿里云计算有限公司) Sybase TeraData FileMaker HANA Solr Adaptive Hbase AzureCosmos InfluxDB PostGIS AzureSynapse Firebird Couchbase AmazonRedshift Informix Memcached Spark Cloudera Firebase ClickHouse Presto Vertica dbase Netezza OpenSearch Flink CouchDB GoogleFirestore Greenplum AmazonAurora H2 Kdb etcd Realm MarkLogic Hazelcast Prometheus OracleEssbase Datastax Aerospike AzureDataExplorer Algolia Ehcache Derby CockroachDB ScyllaDB AzureSearch Interbase AzureTableStorage Sphinx Jackrabbit Trino SingleStore Ingres Virtuoso Timescale GoogleDatastore Graphite HyperSQL Adabas RiakKV SAPIQ ArangoDB Jena Ignite GoogleBigtable TiDB(PingCAP) Accumulo RocksDB OracleNoSQL OpenEdge DuckDB DolphinDB GemFire OrientDB GoogleSpanner RavenDB Anywhere Cache ChinaMobileDB ChinaUnicomDB CirroData FusionInsight GaiaDB GaussDB100 GaussDB200 GoldenDB GreatDB(北京万里开源软件有限公司) HashData HotDB Infinispan KingBase(北京人大金仓信息技术股份有限公司) LightDB MogDB(云和恩墨) MuDB(沐融信息科技) RapidsDB SelectDB SinoDB StarDB UbiSQL UXDB(北京优炫软件股份有限公司) Vastbase(北京海量数据技术股份有限公司) xigemaDB YiDB xugu(成都虚谷伟业科技有限公司) MaxDB Cloudant OracleBerkeley YugabyteDB LevelDB Pinecone HEAVYAI Memgraph CloudKit RethinkDB EXASOL Drill PouchDB Phoenix EDB TDengine IRIS RRDtool GraphDB Citus Coveo IMS LMDB Nebula AmazonNeptune OracleCoherence Geode AmazonSimpleDB PerconaMySQL AmazonCloudSearch Stardog Firebolt Datomic SpatiaLite MonetDB jBASE BaseX Chroma Empress AmazonDocumentDB JanusGraph Mnesia Tibero QuestDB GridDB TigerGraph Db4o Weaviate Tarantool GridGain Dgraph SQLBase OpenTSDB Sedna OceanBase Fauna Datameer PlanetScale ActianNoSQL TimesTen VoltDB FoundationDB Infobright Db2Warehouse NonStopSQL ObjectStore mSQL LiteDB Milvus DataEase Cubrid D3 VictoriaMetrics kylin Giraph GTM ObjectBox HFSQL Meilisearch MatrixOne Perst OracleRdb GigaSpaces Vitess Reality SQLJS Ezmeral AllegroGraph M3DB HAWQ StarRocks solidDB NuoDB NCache OpenGauss IoTDB Qdrant Model204 ZODB BigchainDB SurrealDB Xapian DBISAM ActianVector Hibari Dolt TypeDB Altibase AmazonTimestream ObjectDB Blazegraph AmazonKeyspaces TDSQL(腾讯云计算(北京)有限责任公司) IDMS RDF4J GeoMesa eXistdb eXtremeScale Rockset Yellowbrick SQream DatacomDB Typesense MapDB ObjectivityDB CrateDB eXtreme SciDB AlaSQL KairosDB Kinetica MaxCompute KeyDB OpenInsight AnalyticDBMySQL GemStoneS Vald Doris ScaleArc RisingWave FrontBase PostgresXL Pinot Heroic VistaDB Scalaris NexusDB PerconaMongoDB GraphEngine BoltDB atoti Vespa LokiJS Raima Databend RBASE Redland HarperDB SpliceMachine AnalyticDBPostgreSQL ModeShape Strabon Jade Sequoiadb CnosDB ITTIA Elliptics Elassandra Rasdaman SearchBlox InfiniteGraph ApsaraDBPolarDB Starcounter Axibase Kyligence FeatureBase Lovefield Voldemort Brytlyt MachbaseNeo ActianFastObjects OpenQM RDFox AnzoGraph_DB Fluree Immudb Mimer_SQL YDB RedStore HyperGraphDB Marqo EJDB Tajo DeepLake AntDB LeanXcale Mulgara Fujitsu FlockDB STSdb PieCloudDB Transbase ElevateDB RiakTS FaircomDB NEventStore Comdb2 YottaDB Quasardb Speedb EsgynDB ComputeDB HugeGraph Valentina PipelineDB Bangdb Dydra TinkerGraph EventStore Ultipa Table_Store ActianPSQL CubicWeb Exorbyte GraphBase TokyoTyrant Skytable TerminusDB Badger GreptimeDB TransLattice ArcadeDB KunDB Sparksee MyScale BigObject Linter ManticoreSearch Dragonfly Tigris H2GIS VelocityDB Eloquera HyperLevelDB XTDB Blueflood SenseiDB TSDB TerarkDB OrigoDB TomP2P XtremeData Siaqodb YTsaurus Warp openGemini Upscaledb gStore OushuDB Indica BrightstarDB InfinityDB NosDB Hippo Acebase SiriDB SiteWhere ArgoDB NSDb JaguarDB WakandaDB StellarDB Galaxybase DataFS SadasEngine Hawkular AgensGraph FaircomEDGE Cachelot iBoxDB StateServer Tkrzw SWCDB LedisDB SwayDB Newts ActorDB Intelligence SmallSQL SpaceTime SparkleDB ResinCache JethroData BergDB CortexDB CovenantSQL DaggerDB EdgelessDB Helium HGraphDB JasDB RaptorDB Rizhiyi searchxml BadgerDB Cayley Crase CrispI GraphPortal Grinn ODABA OWASP reldb Voracity ZeroMQ