Tag:Qin Huai

  • JDBC [1] – primary addition, deletion, modification and query

    Time:2021-9-28

    [TOC] 1. What is JDBC JDBC(Java database connectivity) is a method for executing SQL statementsJava API, it can provide unified access to multiple relational databases. It consists of a set of classes and interfaces written in Java language.JDBCProvides a benchmark from which more advanced tools and interfaces can be built to enable database developers to […]

  • Mybatis [19] – mybatis auto correlation many to many query

    Time:2021-9-25

    Note: the code is hosted inGitHubOn, the address is:https://github.com/Damaer/Mybatis-Learning, project ismybatis-15-oneself-many2many, self fetching and Maven environment configuration are requiredmysqlEnvironment(sqlStatement inresourceLowertest.sqlIf you feel useful, you can point a small star. docsifyThe document address is:https://damaer.github.io/Mybatis-Learning/#/ The so-called many to many query is similar to: a student can choose multiple courses, and one may have multiple students. The […]

  • Mybatis [2.3] – must mybatis use commit to successfully modify data?

    Time:2021-5-3

    The code is placed directly in GitHub warehouse【 https://github.com/Damaer/Myb… 】Mybatis-02 can be run directly, so it doesn’t take up space. Why do we sometimes modify the database successfully without using commit? [TOC] 1. From the database level, in fact, it mainly depends on what “storage engine” you use For example, the following code uses the […]

  • Mybatis [8] – how can mybatis return list or map and fuzzy query?

    Time:2021-3-19

    When using mybatis, I often find a requirement. How can I know if I have succeeded in adding / modifying / deleting data? It seems that there is no result after executing SQL. In fact, it is not. After adding, deleting and modifying SQL, there will be a return value of type int, which means […]

  • Mybatis [12] – how to query mybatis multi criteria?

    Time:2021-2-27

    Many times, we need to pass in multiple parameters to the SQL statement, but if these parameters are not an object as a whole, what should we do? Here are two solutions for reference only. 1. Encapsulate multiple parameters into a map To test the interface, we pass in a map where value is an […]

  • Mybatis [15] – mybatis one to one multi table Association query

    Time:2021-2-21

    Note: the code is hosted inGitHubThe address is:https://github.com/Damaer/Mybatis-LearningThe project ismybatis-11-one2one, need to be self fetched, need to be configuredmavenEnvironment andmysqlEnvironment(sqlStatement inresourceNexttest.sqlIf you think it’s useful, you can light a little star. docsifyThe document address is at:https://damaer.github.io/Mybatis-Learning/#/ The so-called one-to-one multi table query, for example: we have many countries, each country has only one leader (assuming), […]

  • Mybatis [16] – mybatis many to one association query

    Time:2021-2-10

    Note: the code is hosted inGitHubThe address is:https://github.com/Damaer/Mybatis-LearningThe project ismybatis-12-many2one, need to be self fetched, need to be configuredmavenEnvironment andmysqlEnvironment(sqlStatement inresourceNexttest.sqlIf you think it’s useful, you can light a little star. docsifyThe document address is at:https://damaer.github.io/Mybatis-Learning/#/ One to many association query: each country has many ministers and leaders. Now we query a leader, hoping to […]

  • Mybatis [18] – mybatis self association many to one query mode

    Time:2021-2-6

    Note: the code is hosted inGitHubThe address is:https://github.com/Damaer/Mybatis-LearningThe project ismybatis-14-oneself-many2one, need to be self fetched, need to configure Maven environment andmysqlEnvironment(sqlStatement inresourceNexttest.sqlIf you think it’s useful, you can light a little star. docsifyThe document address is at:https://damaer.github.io/Mybatis-Learning/#/ Now there is a database query needs, given the current news columnid, hope to find out the parent […]