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
66package 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.
2929type 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.
4242func 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
127127func (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
156156func (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
167167func (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
219219func (q QL ) QueryFieldName (name string ) string {
220220 return ""
221221}
0 commit comments