Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation on SqlRunner #68

Open
GoogleCodeExporter opened this issue Mar 17, 2015 · 5 comments
Open

Documentation on SqlRunner #68

GoogleCodeExporter opened this issue Mar 17, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

What version of the MyBatis are you using?
3.0.1

Please describe the problem.
In the My Batis 3 User Guide the classes SqlBuilder and SelectBuilder are 
mentioned. It is yet not explained how the SQL generated with this classes can 
be used. The user guide should be amended by a description of class SqlRunner.



Original issue reported on code.google.com by c...@team-pb.de on 21 Jul 2010 at 6:41

@GoogleCodeExporter
Copy link
Author

Agreed.

Original comment by cowwoc...@gmail.com on 17 Jan 2011 at 1:27

@GoogleCodeExporter
Copy link
Author

i have same problem!

Original comment by niksh...@gmail.com on 20 Jul 2011 at 12:41

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

I have the same problem!
http://groups.google.com/group/mybatis-user/browse_thread/thread/c80995b1b0ab91e
b

Original comment by y00109...@gmail.com on 8 Feb 2012 at 2:28

@GoogleCodeExporter
Copy link
Author

package chapter6;

import java.util.Map;

import org.apache.ibatis.jdbc.SqlRunner;
import org.apache.ibatis.session.SqlSession;

public class RunSqlRunner extends MyBatisSupport {
    public static void main(String args[]) {
        String sql = "SELECT * FROM SHOP WHERE SHOP_NO" + " = ?";

        SqlSession sqlSession = getSqlSessionFactory().openSession();
        SqlRunner sqlRunner = new SqlRunner(sqlSession.getConnection());

        try {
            Map mapShop = sqlRunner.selectOne(sql, 1);
            System.out.println(mapShop);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            sqlRunner.closeConnection();
            sqlSession.close();
        }
    }
}

Original comment by plusper...@gmail.com on 13 Dec 2012 at 4:14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant