mybatis / mybatis/velocity-scripting

Support template file

Open
#76 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
49
Forks
36
Avg merge
3d 13h
Merged PRs (30d)
6

Description

In current version, template file(vm file) does not support.

For example:

  • CityMapper-findByState.vm
select
  id, name, state, country
from
  city
where
  state = @{state}
  • Mapper
@Select("#parse('/mappers/CityMapper-findByState.vm')")
City findByState(@Param("state") String state);

In above case, @{state} cannot translate to JDBC bind variable (?).

We will consider to support a template file(.vm) like as mybatis-freemarker and mybatis-thymeleaf.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the .vm example and the Mapper method using @Select and @Param. Compare the template-file handling in mybatis-freemarker and mybatis-thymeleaf, then determine the project entry points involved in translating @{state} into a JDBC bind variable. Done means .vm templates can be used through @Select with parameters bound correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.