This is a cache of http://dbflute.seasar.org/ja/manual/function/ormapper/outsidesql/index.html. It is a snapshot of the page at 2024-03-19T00:04:56.615+0000.
外だしSQL(OutsideSql) | DBFlute

外だしSQL(OutsideSql)

外だしSQLの基本

外だしSQLについて
外だしSQLとは?最大の特徴である 2Way-SQL, パラメータコメント など
外だしSQLの使い方
外だしSQLの作成方法や手順など ※わからなくなったらとりあえずここ
  1. 外だしSQLを パラメータコメント を使って 2Way-SQL で書く
  2. Sql2Entity を実行して CustomizeEntityParameterBean を自動生成
  3. Behaviorの outsideSql() メソッドから実行

外だしSQLの機能

Select
検索
selectList()
リスト検索
entityHandling().selectEntity()
一件検索(結果がない場合はnullを戻す)
entityHandling().selectEntityWithDeletedCheck(cb)
一件検索(結果がない場合は例外発生)
manualPaging().selectPage()
手動のページング検索
autoPaging().selectPage()
自動のページング検索
cursorHandling().selectCursor()
カーソル検索
LikeSearch
LikeSearch条件(曖昧検索) - new LikeSearchOption().likePrefix()
Update
更新系
execute()
更新系SQLの実行
Procedure
プロシージャ
call()
プロシージャコール
Option
オプション系
configure() (StatementConfig)
StatementのConfiguration(queryTimeoutなど)
dynamicBinding().select...()
動的バインディング検索
removeBlockComment().select...()
実行時のブロックコメントの削除
removeLineComment().select...()
実行時の行コメントの削除
formatSql().select...()
実行時のSQLのフォーマット(空行の削除など)

外だしSQLのExample

外だしSQLの Example プロジェクトがありますのでぜひ参考に。

DBFlute Example - 基本的な HowTo