The best way to log SQL statements with JDBC, JPA or Hibernate Imagine having a tool that can automatically detect JPA and Hibernate performance issues. Wouldn’t that be just awesome? Well, Hypersistence Optimizer is that tool! And it works with Spring Boot, Spring Framework, Jakarta EE, Java EE, Quarkus, or Play Framework. So, enjoy spending your time on the things you love rather than fixing per
まずは、log4jdbc から JDK のバージョンにあった jar ファイルを入手します。 log4jdbc3-{バージョン}.jar (JDK 1.4 or 5.0) log4jdbc4-{バージョン}.jar (JDK 6.0 or 7.0) log4jdbc は SLF4J を使用しているので、これも入手します。 slf4j-api-{バージョン}.jar slf4j-log4j12-{バージョン}.jar 最初に JDBC のドライバ名に net.sf.log4jdbc.DriverSpy を指定します。 次に JDBC の接続 URL に jdbc:log4 を追加します。 jdbc:oracle:thin:@localhost:11521:java6 ↓ jdbc:log4jdbc:oracle:thin:@localhost:11521:java6 最後に log4j.xm
SansOrm is not an ORM. SansOrm library will... Massively decrease the boilerplate code you write even if you use pure SQL (and no Java objects) Persist and retrieve simple annotated Java objects, and lists thereof, without you writing SQL Persist and retrieve complex annotated Java objects, and lists thereof, where you provide the SQL SansOrm will never... Perform a JOIN for you Persist a graph of
SQL in Java 8: ResultSet Streams. With Java 8, writing SQL will change fundamentally, no matter what API you're using. List<Schema> result = new ArrayList<>(); try (Connection c = getConnection()) { String sql = "select schema_name, is_default " + "from information_schema.schemata " + "order by schema_name"; try (PreparedStatement stmt = c.prepareStatement(sql); ResultSet rs = stmt.executeQuery())
Jdbi provides convenient, idiomatic, access to relational data in Java. Jdbi 3 is the third major release, which introduces enhanced support for modern Java, countless refinements to the design and implementation, and enhanced support for modular development through plugins and extensions. Jdbi is built on top of JDBC. If your data source has a JDBC driver, you can use it with Jdbi. It improves JD
SQLShellはOracle/MySQL/PostgreSQL/SQLite/AccessのDB操作を行う統括フロントエンド。 SQLShellはJava製のオープンソース・ソフトウェア。システム開発をしていると様々なデータベースに触る機会がある。エンタープライズであればOracle、もう少し軽量なシステムであればPostgreSQL、個人やWeb系のシステムであればMySQLやSQLiteといった具合だ。 DB情報 それぞれのシステムで専用のフロントエンドを備えている。だがツールごとに立ち上げ方が違っていたり、操作方法が異なるのは覚えるのも面倒になってしまう。それらを統合してくれるのがSQLShellだ。 SQLShellはJDBCが対応しているデータベースに対して接続し、SQLを実行できるソフトウェアだ。もちろんSQLには各DBごとに方言はあるが、ツールの入り口としてSQLShell
S2UnitはDBを使ったユニットテストの支援機能としてExcelファイルからDBにテスト用データを投入したり、ExcelファイルとDBの内容を比較したりすることができます。ただ、実際にやってみるとわかるのですがこのExcelファイルのメンテナンスコストが馬鹿になりません。 そこで、実際にDBにアクセスするのではなく、フレームワークやJDBCドライバのレイヤで発行されたSQLを横取りし、期待通りのSQLが発行されたのかどうかを確認するという方法はどうだろう?と考えました。そういうライブラリを自作しようかとも思ったのですが(実際途中まで作っていたのですが)、世の中同じことを考える人はいるもので、MockRunnerのJDBC Mockという機能を使うとそのものズバリなことができるようです。 http://mockrunner.sourceforge.net/examplesjdbc.html
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く