Skip to content

Commit 45ccf0c

Browse files
committed
Spelling errors
1 parent 9af5955 commit 45ccf0c

File tree

6 files changed

+9
-10
lines changed

6 files changed

+9
-10
lines changed

src/site/markdown/docs/functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Database Functions
22

3-
The library supplies implementations for several common database functions. We do not try to implement a large set of functions. Rather we supply some common functions as examples and make it relatively easy to write your own implementations of functions you might want to use that are not supplied by the library. See the page "Extending the Library" for informtion about how to write your own functions.
3+
The library supplies implementations for several common database functions. We do not try to implement a large set of functions. Rather we supply some common functions as examples and make it relatively easy to write your own implementations of functions you might want to use that are not supplied by the library. See the page "Extending the Library" for information about how to write your own functions.
44

55
The supplied functions are all in the `org.mybatis.dynamic.sql.select.function` package. In addition, there are static methods in the `SqlBuilder` to access all functions.
66

src/site/markdown/docs/insert.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ It is important to open a MyBatis session by setting the executor type to BATCH.
215215
Notice that the same mapper method that is used to insert a single record is now executed multiple times. The `map` methods are the same with the exception that the `toPropertyWhenPresent` mapping is not supported for batch inserts.
216216

217217
## General Insert Statement
218-
A general insert is used to build arbitrary insert statements. The general insert does not require a separate record object o hold values for the statement - any value can be passed into the statement. This version of the insert is not convienient for retriving generated keys with MyBatis - for that use case we recommend the "single record insert". However the general insert is perfectly acceptible for Spring JDBC template or MyBatis inserts that do not return generated keys. For example
218+
A general insert is used to build arbitrary insert statements. The general insert does not require a separate record object to hold values for the statement - any value can be passed into the statement. This version of the insert is not convenient for retrieving generated keys with MyBatis - for that use case we recommend the "single record insert". However the general insert is perfectly acceptable for Spring JDBC template or MyBatis inserts that do not return generated keys. For example
219219

220220
```java
221221
GeneralInsertStatementProvider insertStatement = insertInto(animalData)

src/site/markdown/docs/kotlinMyBatis3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ val rows = mapper.count {
113113
}
114114
```
115115

116-
There is also an extention method that can be used to count all rows in a table:
116+
There is also an extension method that can be used to count all rows in a table:
117117

118118
```kotlin
119119
val rows = mapper.count { allRows() }

src/site/markdown/docs/kotlinSpring.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This page will show our recommended pattern for using the MyBatis Dynamic SQL wi
66
All Kotlin support for Spring is available in two packages:
77

88
* `org.mybatis.dynamic.sql.util.kotlin` - contains extension methods and utilities to enable an idiomatic Kotlin DSL for MyBatis Dynamic SQL. These objects can be used for clients using any execution target (i.e. MyBatis3 or Spring JDBC Templates)
9-
* `org.mybatis.dynamic.sql.util.kotlin.spring` - contains utlities specifically to simplify integration with Spring JDBC Template
9+
* `org.mybatis.dynamic.sql.util.kotlin.spring` - contains utilities specifically to simplify integration with Spring JDBC Template
1010

1111
The Kotlin support for Spring is implemented as extension methods to `NamedParameterJdbcTemplate`. There are extension methods to support count, delete, insert, select, and update operations based on SQL generated by this library. For each operation, there are two different methods of executing SQL. With the first method you build the appropriate SQL provider object as a separate step before executing the SQL. The second method combines these two operations into a single step. We will illustrate both approaches below.
1212

@@ -85,7 +85,7 @@ This is the two step execution process. This can be combined into a single step
8585
}
8686
```
8787

88-
There is also an extention method that can be used to count all rows in a table:
88+
There is also an extension method that can be used to count all rows in a table:
8989

9090
```kotlin
9191
val rows = template.countFrom(Person) {
@@ -120,7 +120,7 @@ This is the two step execution process. This can be combined into a single step
120120
}
121121
```
122122

123-
There is also an extention method that can be used to count all rows in a table:
123+
There is also an extension method that can be used to count all rows in a table:
124124

125125
```kotlin
126126
val rows = template.deleteFrom(Person) {
@@ -278,7 +278,7 @@ This is the two step execution process. This can be combined into a single step
278278
}
279279
```
280280

281-
There are similar methods for selecing a single row, or executing a select distinct query. For example, you could implement a "select by primary key" method using code like this:
281+
There are similar methods for selecting a single row, or executing a select distinct query. For example, you could implement a "select by primary key" method using code like this:
282282

283283
```kotlin
284284
val record = template.selectOne(id, firstName, lastName, birthDate, employed, occupation, addressId)
@@ -299,7 +299,7 @@ There are similar methods for selecing a single row, or executing a select disti
299299

300300
In this case, the data type for `record` would be `PersonRecord?` - a nullable value.
301301

302-
There is also an extention method that can be used to select all rows in a table:
302+
There is also an extension method that can be used to select all rows in a table:
303303

304304
```kotlin
305305
val rows = template.select(id, firstName, lastName, birthDate, employed, occupation, addressId)

src/site/markdown/docs/mybatis3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ To use this support, we envision creating several methods on a MyBatis mapper in
1616
long count(SelectStatementProvider selectStatement);
1717
```
1818

19-
This is a standard method for MyBatis Dynamic SQL that executes a query and returns a `long`. The other methods will reuse this method and supply everything needed to build the select statement except the where clause. There are several varients of count queries that may be useful:
19+
This is a standard method for MyBatis Dynamic SQL that executes a query and returns a `long`. The other methods will reuse this method and supply everything needed to build the select statement except the where clause. There are several variants of count queries that may be useful:
2020

2121
1. `count(*)` - counts the number of rows that match a where clause
2222
1. `count(column)` - counts the number of non-null column values that match a where clause

src/site/markdown/docs/spring.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ The SQL statement objects are created in exactly the same way as for MyBatis - o
1717
MyBatis3 is a higher level abstraction over JDBC than Spring JDBC templates. While most functions in the library will work with Spring, there are some functions that do not work:
1818

1919
1. Spring JDBC templates do not have anything equivalent to a type handler in MyBatis3. Therefore it is best to use data types that can be automatically understood by Spring
20-
1. The multiple row insert statement *will not* render properly for Spring. However, batch inserts *will* render properly for Spring
2120

2221
## Executing Select Statements
2322
The Spring Named Parameter JDBC template expects an SQL statement with parameter markers in the Spring format, and a set of matched parameters. MyBatis Dynamic SQL will generate both. The parameters returned from the generated SQL statement can be wrapped in a Spring `MapSqlParameterSource`. Spring also expects you to provide a row mapper for creating the returned objects. The following code shows a complete example:

0 commit comments

Comments
 (0)