Coder Social home page Coder Social logo

mybatis-beetl-scripting's Introduction

MyBatis Beetl Support Build Status

mybatis-velocity

Introduction

mybatis-beetl is an extension that allows you to use the Beetl scripting language to generate your dynamic SQL queries on the fly.

If you are not familiar with beetl, you can learn it from its documentation site:

Beetl Reference

Install

  1. Put the mybatis-beetl-scripting-.jar in your classpath.

    If you are using maven, just add a dependency to:

<dependency>
    <groupId>com.ifrabbit</groupId>
    <artifactId>mybatis-beetl-scripting</artifactId>
    <version>1.0.3.RELEASE</version>
</dependency>
  1. Register the language driver alias in your mybatis configuration file:
<configuration>
  ...
  <typeAliases>
    <typeAlias alias="beetl" type="org.mybatis.scripting.beetl.Driver"/>
  </typeAliases>
  ...
</configuration>
  1. Optional: Set the beetl as your default scripting language:
<configuration>
  ...
  <settings>
    <setting name="defaultScriptingLanguage" value="beetl"/>
  </settings>
  ...
</configuration>

Usage

Just write your dynamic queries and use beetl:

Example:

<select id="findPerson" lang="beetl">
  SELECT *
  FROM person
  WHERE name LIKE #_parameter.name#
</select>

Contributing to MyBatis Beetl Scripting

Here are some ways for you to get involved in the community:

  • Github is for social coding: if you want to write code, we encourage contributions through pull requests from forks of this repository.

Help me better - Donation

paypal

mybatis-beetl-scripting's People

Contributors

easybest avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.