Permalink
Browse files

Drop 'w' from my name.

  • Loading branch information...
1 parent 0796b42 commit c9b956ca8b57bc171dd0cbd3365cae0ed1cf8c2b @fukamachi committed Aug 4, 2014
Showing with 27 additions and 37 deletions.
  1. +1 −1 LICENSE
  2. +8 −8 README.markdown
  3. +0 −5 src/sxql.lisp
  4. +2 −2 sxql-test.asd
  5. +3 −3 sxql.asd
  6. +3 −3 t/statement.lisp
  7. +10 −15 t/sxql.lisp
View
@@ -1,4 +1,4 @@
-Copyright (c) 2013, Eitarow Fukamachi
+Copyright (c) 2013-2014, Eitaro Fukamachi
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
View
@@ -60,8 +60,8 @@ Creates a SELECT query. It takes a field (or a list of fields) and SQL Clauses.
(insert-into :person
(set= :sex "male"
:age 25
- :name "Eitarow Fukamachi"))
-;=> #<SXQL-STATEMENT: INSERT INTO person SET sex = 'male', age = 25, name = 'Eitarow Fukamachi'>
+ :name "Eitaro Fukamachi"))
+;=> #<SXQL-STATEMENT: INSERT INTO person SET sex = 'male', age = 25, name = 'Eitaro Fukamachi'>
(insert-into :person
(:id :name)
@@ -75,16 +75,16 @@ Creates a SELECT query. It takes a field (or a list of fields) and SQL Clauses.
```common-lisp
(update :person
(set= :age 26)
- (where (:like :name "Eitarow %")))
-;=> #<SXQL-STATEMENT: UPDATE person SET age = 26 WHERE (name LIKE 'Eitarow %')>
+ (where (:like :name "Eitaro %")))
+;=> #<SXQL-STATEMENT: UPDATE person SET age = 26 WHERE (name LIKE 'Eitaro %')>
```
### delete-from (table &body clauses)
```common-lisp
(delete-from :person
- (where (:= :name "Eitarow Fukamachi")))
-;=> #<SXQL-STATEMENT: DELETE FROM person WHERE (name = 'Eitarow Fukamachi')>
+ (where (:= :name "Eitaro Fukamachi")))
+;=> #<SXQL-STATEMENT: DELETE FROM person WHERE (name = 'Eitaro Fukamachi')>
```
### union-queies (&rest statements)
@@ -414,11 +414,11 @@ Creates a SELECT query. It takes a field (or a list of fields) and SQL Clauses.
## Author
-* Eitarow Fukamachi (e.arrows@gmail.com)
+* Eitaro Fukamachi (e.arrows@gmail.com)
## Copyright
-Copyright (c) 2013 Eitarow Fukamachi (e.arrows@gmail.com)
+Copyright (c) 2013-2014 Eitaro Fukamachi (e.arrows@gmail.com)
# License
View
@@ -1,8 +1,3 @@
-#|
- This file is a part of sxql project.
- Copyright (c) 2013 Eitarow Fukamachi (e.arrows@gmail.com)
-|#
-
(in-package :cl-user)
(defpackage sxql
(:use :cl
View
@@ -1,6 +1,6 @@
#|
This file is a part of sxql project.
- Copyright (c) 2013 Eitarow Fukamachi (e.arrows@gmail.com)
+ Copyright (c) 2013-2014 Eitaro Fukamachi (e.arrows@gmail.com)
|#
(in-package :cl-user)
@@ -9,7 +9,7 @@
(in-package :sxql-test-asd)
(defsystem sxql-test
- :author "Eitarow Fukamachi"
+ :author "Eitaro Fukamachi"
:license "BSD 3-Clause"
:depends-on (:sxql
:cl-test-more)
View
@@ -1,10 +1,10 @@
#|
This file is a part of sxql project.
- Copyright (c) 2013 Eitarow Fukamachi (e.arrows@gmail.com)
+ Copyright (c) 2013-2014 Eitaro Fukamachi (e.arrows@gmail.com)
|#
#|
- Author: Eitarow Fukamachi (e.arrows@gmail.com)
+ Author: Eitaro Fukamachi (e.arrows@gmail.com)
|#
(in-package :cl-user)
@@ -14,7 +14,7 @@
(defsystem sxql
:version "0.0.1"
- :author "Eitarow Fukamachi"
+ :author "Eitaro Fukamachi"
:license "BSD 3-Clause"
:depends-on (:optima
:iterate
View
@@ -19,20 +19,20 @@
(make-clause :fields :*)
(make-clause :from (make-sql-symbol "table-name"))
(make-clause :where
- (make-op := :name "Eitarow"))))
+ (make-op := :name "Eitaro"))))
(is (yield (make-statement :select
(make-clause :fields :*)
(make-clause :from (make-sql-symbol "table-name"))
(make-clause :where
- (make-op := :name "Eitarow"))))
+ (make-op := :name "Eitaro"))))
"SELECT * FROM `table-name` WHERE (`name` = ?)")
(is (yield (make-statement :select
(make-clause :fields :a :b)
(make-clause :from (make-sql-symbol "table-name"))
(make-clause :where
- (make-op := :name "Eitarow"))))
+ (make-op := :name "Eitaro"))))
"SELECT `a`, `b` FROM `table-name` WHERE (`name` = ?)")
(is (multiple-value-list
View
@@ -1,8 +1,3 @@
-#|
- This file is a part of sxql project.
- Copyright (c) 2013 Eitarow Fukamachi (e.arrows@gmail.com)
-|#
-
(in-package :cl-user)
(defpackage t.sxql
(:use :cl
@@ -136,9 +131,9 @@
(is-mv (offset limit) '("OFFSET 10" ())))
(is-mv (insert-into :person
- (set= :name "Eitarow"
+ (set= :name "Eitaro"
:sex "male"))
- '("INSERT INTO `person` (`name`, `sex`) VALUES (?, ?)" ("Eitarow" "male"))
+ '("INSERT INTO `person` (`name`, `sex`) VALUES (?, ?)" ("Eitaro" "male"))
"INSERT INTO")
(is-mv (insert-into :person (:name :sex)
@@ -147,13 +142,13 @@
"INSERT INTO ... SELECT")
(is-mv (update :person
- (set= :name "Eitarow Fukamachi"
+ (set= :name "Eitaro Fukamachi"
:sex "male")
(where (:> :age 20))
(order-by :id)
(limit 5))
'("UPDATE `person` SET `name` = ?, `sex` = ? WHERE (`age` > ?) ORDER BY `id` LIMIT 5"
- ("Eitarow Fukamachi" "male" 20))
+ ("Eitaro Fukamachi" "male" 20))
"UPDATE")
(is-mv (delete-from :person
@@ -165,17 +160,17 @@
"DELETE FROM")
(let ((table :person)
- (name "Eitarow"))
- (is-mv (set= :name name) '("SET `name` = ?" ("Eitarow")))
- (is-mv (set= :name (concatenate 'string name " Fukamachi")) '("SET `name` = ?" ("Eitarow Fukamachi")))
+ (name "Eitaro"))
+ (is-mv (set= :name name) '("SET `name` = ?" ("Eitaro")))
+ (is-mv (set= :name (concatenate 'string name " Fukamachi")) '("SET `name` = ?" ("Eitaro Fukamachi")))
(is-mv (insert-into table
(set= :name name))
- '("INSERT INTO `person` (`name`) VALUES (?)" ("Eitarow")))
+ '("INSERT INTO `person` (`name`) VALUES (?)" ("Eitaro")))
(is-mv (update table
(set= :name name))
- '("UPDATE `person` SET `name` = ?" ("Eitarow")))
+ '("UPDATE `person` SET `name` = ?" ("Eitaro")))
(is-mv (delete-from table (where (:= :name name)))
- '("DELETE FROM `person` WHERE (`name` = ?)" ("Eitarow"))))
+ '("DELETE FROM `person` WHERE (`name` = ?)" ("Eitaro"))))
(is-mv (union-queries
(select :* (from :table-1) (where (:= :a 10)))

0 comments on commit c9b956c

Please sign in to comment.