Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e0f4d6f

Browse files
committed
lint
1 parent 03641d6 commit e0f4d6f

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

‎ql.go‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Package ql exposes implementations and functions that enables ngorm to work
22
// with ql database.
33
//
4-
// ql is an embedded sql database. This database doesn't conform 100% qith the
4+
// ql is an embedded sql database. This database doesn't conform 100% with the
55
// SQL standard. The link to the project is https://github.com/cznic/ql
66
package ql
77

@@ -23,7 +23,7 @@ import (
2323
//
2424
// For some reason the ql database doesn't support multiple databases, as
2525
// databases are file based. So, the name of the file is the name of the
26-
// database.. Which doesn't affect the querries, since the database name is
26+
// database.. Which doesn't affect the queries, since the database name is
2727
// irrelevant assuming the SQLCommon interface is the handle over the open
2828
// database.
2929
type QL struct {
@@ -37,7 +37,7 @@ func Memory() *QL {
3737
return &QL{name: "ql-mem"}
3838
}
3939

40-
//File returns the dialcet for file backed ql database. This is the recommended
40+
//File returns the dialect for file backed ql database. This is the recommended
4141
//way use the Memory only for testing else you might lose all of your data.
4242
func File() *QL {
4343
return &QL{name: "ql"}
@@ -125,11 +125,11 @@ func (q *QL) DataTypeOf(field *model.StructField) (string, error) {
125125

126126
// HasIndex check has index or not
127127
func (q *QL) HasIndex(tableName string, indexName string) bool {
128-
querry := "select count() from __Index where Name=1ドル && TableName=2ドル"
128+
query := "select count() from __Index where Name=1ドル && TableName=2ドル"
129129
var count int
130-
err := q.db.QueryRow(querry, indexName, tableName).Scan(&count)
130+
err := q.db.QueryRow(query, indexName, tableName).Scan(&count)
131131
if err != nil {
132-
//TODO; Propery log or return this error?
132+
//TODO; Ropery log or return this error?
133133
}
134134
return count > 0
135135
}
@@ -154,22 +154,22 @@ func (q *QL) RemoveIndex(tableName string, indexName string) error {
154154

155155
// HasTable check has table or not
156156
func (q *QL) HasTable(tableName string) bool {
157-
querry := "select count() from __Table where Name=1ドル"
157+
query := "select count() from __Table where Name=1ドル"
158158
var count int
159-
err := q.db.QueryRow(querry, tableName).Scan(&count)
159+
err := q.db.QueryRow(query, tableName).Scan(&count)
160160
if err != nil {
161-
//TODO; Propery log or return this error?
161+
//TODO; Ropery log or return this error?
162162
}
163163
return count > 0
164164
}
165165

166166
// HasColumn check has column or not
167167
func (q *QL) HasColumn(tableName string, columnName string) bool {
168-
querry := "select count() from __Column where Name=1ドル && TableName=2ドル"
168+
query := "select count() from __Column where Name=1ドル && TableName=2ドル"
169169
var count int
170-
err := q.db.QueryRow(querry, columnName, tableName).Scan(&count)
170+
err := q.db.QueryRow(query, columnName, tableName).Scan(&count)
171171
if err != nil {
172-
//TODO; Propery log or return this error?
172+
//TODO; Ropery log or return this error?
173173
}
174174
return count > 0
175175
}
@@ -214,8 +214,8 @@ func (q *QL) CurrentDatabase() string {
214214
//QueryFieldName returns prefix for field names if name. For instance users.id
215215
//to point to users id field.
216216
//
217-
// ql doesnt support this, so it returns an empty string for tablename prefix on
218-
// fields. insead of users.id to becomes id
217+
// ql doesn't support this, so it returns an empty string for tablename prefix on
218+
// fields. instead of users.id to becomes id
219219
func (q QL) QueryFieldName(name string) string {
220220
return ""
221221
}

‎ql_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func TestDialect(t *testing.T) {
7171
}
7272

7373
if d.HasIndex("Orders", "OrdersID") {
74-
t.Error("expected to be fasle")
74+
t.Error("expected to be false")
7575
}
7676

7777
// Has Table

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /