最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

SimultaneousMySqlandPostgreSqlDataConnectionsinJava_MySQL

来源:动视网 责编:小采 时间:2020-11-09 19:14:58
文档

SimultaneousMySqlandPostgreSqlDataConnectionsinJava_MySQL

SimultaneousMySqlandPostgreSqlDataConnectionsinJava_MySQL:Were importing records from a MySql database and entering them into PostgreSql in Java. In the process well be modifying the MySql data a bit, but thats for another blog post.
推荐度:
导读SimultaneousMySqlandPostgreSqlDataConnectionsinJava_MySQL:Were importing records from a MySql database and entering them into PostgreSql in Java. In the process well be modifying the MySql data a bit, but thats for another blog post.
 We’re importing records from a MySql database and entering them into PostgreSql in Java. In the process we’ll be modifying the MySql data a bit, but that’s for another blog post. Today we’re going to show supporting both input and output database providers which enables us to seamlessly hand-off objects from one data source to another.

We have two providers as you see here, a MySql provider as input and PostgreSql as output.

In the base provider class, be it MySql or PostgreSql we use a Connections class to retrieve ourInputConnection()or ourOutputConnection().

To retrieve the “NixImportConnection” object we rely on the Configuration class which we’ll see next. Here is where we call the Configuration class in NixImportConnection.

We’re one step closer to the connection’s properties in the Configuration class where we’ll retrieve the configuration name of the input and output connections from the app’s properties file.

The properties file is where we define the connection name, giving us the ability to change it at any time based on environment or development needs.

We arrive at our Connections.xml file where the information to populate our Connection Properties formysql.burkey_nixmash andpostgresql.nixmashupdb.

With dual data providers for MySql and PostgreSql we can easily hand-off objects from one source to another with

NixImportMySql db = NixImportMySql.loadProvider();

and

NixImportPostgreSql db = NixImportPostgreSql.loadProvider();

文档

SimultaneousMySqlandPostgreSqlDataConnectionsinJava_MySQL

SimultaneousMySqlandPostgreSqlDataConnectionsinJava_MySQL:Were importing records from a MySql database and entering them into PostgreSql in Java. In the process well be modifying the MySql data a bit, but thats for another blog post.
推荐度:
标签: and java sin
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top