+
Skip to content

fix table not containing schema in insert method #207

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ object Employees : Table<Employee>("t_employee") {

> Naming Strategy: It's highly recommended to name your entity classes by singular nouns, name table objects by plurals (eg. Employee/Employees, Department/Departments).

Now that column bindings are configured, so we can use [sequence APIs](#Entity-Sequence-APIs) to perform many operations on entities. Let's add two extension properties for `Database` first. These properties return new created sequence objects via `sequenceOf` and they can help use improve the readability of the code:
Now that column bindings are configured, so we can use [sequence APIs](#Entity-Sequence-APIs) to perform many operations on entities. Let's add two extension properties for `Database` first. These properties return new created sequence objects via `sequenceOf` and they can help us improve the readability of the code:

```kotlin
val Database.departments get() = this.sequenceOf(Departments)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,8 @@ public abstract class SqlFormatter(

override fun visitInsert(expr: InsertExpression): InsertExpression {
writeKeyword("insert into ")
write("${expr.table.name.quoted} (")
visitTable(expr.table)
write("(")
for ((i, assignment) in expr.assignments.withIndex()) {
if (i > 0) write(", ")
checkColumnName(assignment.column.name)
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载