-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update docs to reflect rename of Expression to SQLExpression
- Loading branch information
Showing
10 changed files
with
95 additions
and
323 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,8 +42,8 @@ extension SchemaType { | |
/// Builds a copy of the query with the `SELECT` clause applied. | ||
/// | ||
/// let users = Table("users") | ||
/// let id = Expression<Int64>("id") | ||
/// let email = Expression<String>("email") | ||
/// let id = SQLExpression<Int64>("id") | ||
/// let email = SQLExpression<String>("email") | ||
/// | ||
/// users.select(id, email) | ||
/// // SELECT "id", "email" FROM "users" | ||
|
@@ -58,7 +58,7 @@ extension SchemaType { | |
/// Builds a copy of the query with the `SELECT DISTINCT` clause applied. | ||
/// | ||
/// let users = Table("users") | ||
/// let email = Expression<String>("email") | ||
/// let email = SQLExpression<String>("email") | ||
/// | ||
/// users.select(distinct: email) | ||
/// // SELECT DISTINCT "email" FROM "users" | ||
|
@@ -73,8 +73,8 @@ extension SchemaType { | |
/// Builds a copy of the query with the `SELECT` clause applied. | ||
/// | ||
/// let users = Table("users") | ||
/// let id = Expression<Int64>("id") | ||
/// let email = Expression<String>("email") | ||
/// let id = SQLExpression<Int64>("id") | ||
/// let email = SQLExpression<String>("email") | ||
/// | ||
/// users.select([id, email]) | ||
/// // SELECT "id", "email" FROM "users" | ||
|
@@ -89,7 +89,7 @@ extension SchemaType { | |
/// Builds a copy of the query with the `SELECT DISTINCT` clause applied. | ||
/// | ||
/// let users = Table("users") | ||
/// let email = Expression<String>("email") | ||
/// let email = SQLExpression<String>("email") | ||
/// | ||
/// users.select(distinct: [email]) | ||
/// // SELECT DISTINCT "email" FROM "users" | ||
|
@@ -132,7 +132,7 @@ extension SchemaType { | |
/// Builds a scalar copy of the query with the `SELECT` clause applied. | ||
/// | ||
/// let users = Table("users") | ||
/// let id = Expression<Int64>("id") | ||
/// let id = SQLExpression<Int64>("id") | ||
/// | ||
/// users.select(id) | ||
/// // SELECT "id" FROM "users" | ||
|
@@ -151,7 +151,7 @@ extension SchemaType { | |
/// applied. | ||
/// | ||
/// let users = Table("users") | ||
/// let email = Expression<String>("email") | ||
/// let email = SQLExpression<String>("email") | ||
/// | ||
/// users.select(distinct: email) | ||
/// // SELECT DISTINCT "email" FROM "users" | ||
|
@@ -186,7 +186,7 @@ extension QueryType { | |
/// Adds a `UNION` clause to the query. | ||
/// | ||
/// let users = Table("users") | ||
/// let email = Expression<String>("email") | ||
/// let email = SQLExpression<String>("email") | ||
/// | ||
/// users.filter(email == "[email protected]").union(users.filter(email == "[email protected]")) | ||
/// // SELECT * FROM "users" WHERE email = '[email protected]' UNION SELECT * FROM "users" WHERE email = '[email protected]' | ||
|
@@ -209,9 +209,9 @@ extension QueryType { | |
/// Adds a `JOIN` clause to the query. | ||
/// | ||
/// let users = Table("users") | ||
/// let id = Expression<Int64>("id") | ||
/// let id = SQLExpression<Int64>("id") | ||
/// let posts = Table("posts") | ||
/// let userId = Expression<Int64>("user_id") | ||
/// let userId = SQLExpression<Int64>("user_id") | ||
/// | ||
/// users.join(posts, on: posts[userId] == users[id]) | ||
/// // SELECT * FROM "users" INNER JOIN "posts" ON ("posts"."user_id" = "users"."id") | ||
|
@@ -230,9 +230,9 @@ extension QueryType { | |
/// Adds a `JOIN` clause to the query. | ||
/// | ||
/// let users = Table("users") | ||
/// let id = Expression<Int64>("id") | ||
/// let id = SQLExpression<Int64>("id") | ||
/// let posts = Table("posts") | ||
/// let userId = Expression<Int64?>("user_id") | ||
/// let userId = SQLExpression<Int64?>("user_id") | ||
/// | ||
/// users.join(posts, on: posts[userId] == users[id]) | ||
/// // SELECT * FROM "users" INNER JOIN "posts" ON ("posts"."user_id" = "users"."id") | ||
|
@@ -251,9 +251,9 @@ extension QueryType { | |
/// Adds a `JOIN` clause to the query. | ||
/// | ||
/// let users = Table("users") | ||
/// let id = Expression<Int64>("id") | ||
/// let id = SQLExpression<Int64>("id") | ||
/// let posts = Table("posts") | ||
/// let userId = Expression<Int64>("user_id") | ||
/// let userId = SQLExpression<Int64>("user_id") | ||
/// | ||
/// users.join(.LeftOuter, posts, on: posts[userId] == users[id]) | ||
/// // SELECT * FROM "users" LEFT OUTER JOIN "posts" ON ("posts"."user_id" = "users"."id") | ||
|
@@ -274,9 +274,9 @@ extension QueryType { | |
/// Adds a `JOIN` clause to the query. | ||
/// | ||
/// let users = Table("users") | ||
/// let id = Expression<Int64>("id") | ||
/// let id = SQLExpression<Int64>("id") | ||
/// let posts = Table("posts") | ||
/// let userId = Expression<Int64?>("user_id") | ||
/// let userId = SQLExpression<Int64?>("user_id") | ||
/// | ||
/// users.join(.LeftOuter, posts, on: posts[userId] == users[id]) | ||
/// // SELECT * FROM "users" LEFT OUTER JOIN "posts" ON ("posts"."user_id" = "users"."id") | ||
|
@@ -302,7 +302,7 @@ extension QueryType { | |
/// Adds a condition to the query’s `WHERE` clause. | ||
/// | ||
/// let users = Table("users") | ||
/// let id = Expression<Int64>("id") | ||
/// let id = SQLExpression<Int64>("id") | ||
/// | ||
/// users.filter(id == 1) | ||
/// // SELECT * FROM "users" WHERE ("id" = 1) | ||
|
@@ -317,7 +317,7 @@ extension QueryType { | |
/// Adds a condition to the query’s `WHERE` clause. | ||
/// | ||
/// let users = Table("users") | ||
/// let age = Expression<Int?>("age") | ||
/// let age = SQLExpression<Int?>("age") | ||
/// | ||
/// users.filter(age >= 35) | ||
/// // SELECT * FROM "users" WHERE ("age" >= 35) | ||
|
@@ -426,8 +426,8 @@ extension QueryType { | |
/// Sets an `ORDER BY` clause on the query. | ||
/// | ||
/// let users = Table("users") | ||
/// let email = Expression<String>("email") | ||
/// let name = Expression<String?>("name") | ||
/// let email = SQLExpression<String>("email") | ||
/// let name = SQLExpression<String?>("name") | ||
/// | ||
/// users.order(email.desc, name.asc) | ||
/// // SELECT * FROM "users" ORDER BY "email" DESC, "name" ASC | ||
|
@@ -442,8 +442,8 @@ extension QueryType { | |
/// Sets an `ORDER BY` clause on the query. | ||
/// | ||
/// let users = Table("users") | ||
/// let email = Expression<String>("email") | ||
/// let name = Expression<String?>("name") | ||
/// let email = SQLExpression<String>("email") | ||
/// let name = SQLExpression<String?>("name") | ||
/// | ||
/// users.order([email.desc, name.asc]) | ||
/// // SELECT * FROM "users" ORDER BY "email" DESC, "name" ASC | ||
|