Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
ranemd double2 to double
Browse files Browse the repository at this point in the history
  • Loading branch information
Casperhr committed Jan 5, 2017
1 parent 1382b36 commit dd425f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Sources/Creator+MySQLTypes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,11 @@ extension Schema.Creator {
/// - optional: make column optional
/// - unique: make column unique
/// - default: default value
public func double2(
public func double(
_ name: String,
precision: UInt = 4,
digits: UInt = 2,
signed: Bool = true,
signed: Bool,
optional: Bool = false,
unique: Bool = false,
default value: NodeRepresentable? = nil
Expand Down
12 changes: 6 additions & 6 deletions Tests/SugarTests/CreatorMySQLTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ class CreatorMySQLTests: XCTestCase {
// MARK: DOUBLE
func testDouble() {
let builder = Schema.Creator("table")
builder.double2("column")
builder.double("column", signed: true)

let sql = builder.schema.sql
let serializer = MySQLSerializer(sql: sql)
Expand All @@ -635,7 +635,7 @@ class CreatorMySQLTests: XCTestCase {

func testDoubleSigned() {
let builder = Schema.Creator("table")
builder.double2("column", signed: false)
builder.double("column", signed: false)

let sql = builder.schema.sql
let serializer = MySQLSerializer(sql: sql)
Expand All @@ -648,7 +648,7 @@ class CreatorMySQLTests: XCTestCase {

func testDoubleOptional() {
let builder = Schema.Creator("table")
builder.double2("column", optional: true)
builder.double("column", signed: true, optional: true)

let sql = builder.schema.sql
let serializer = MySQLSerializer(sql: sql)
Expand All @@ -662,7 +662,7 @@ class CreatorMySQLTests: XCTestCase {

func testDoubleUnique() {
let builder = Schema.Creator("table")
builder.double2("column", optional: true, unique: true)
builder.double("column", signed: true, optional: true, unique: true)

let sql = builder.schema.sql
let serializer = MySQLSerializer(sql: sql)
Expand All @@ -675,7 +675,7 @@ class CreatorMySQLTests: XCTestCase {

func testDoubleDefault() {
let builder = Schema.Creator("table")
builder.double2("column", optional: true, default: 0)
builder.double("column", signed: true, optional: true, default: 0)

let sql = builder.schema.sql
let serializer = MySQLSerializer(sql: sql)
Expand All @@ -688,7 +688,7 @@ class CreatorMySQLTests: XCTestCase {

func testDoublePrecisionDigist() {
let builder = Schema.Creator("table")
builder.double2("column", precision: 3, digits: 5, optional: true)
builder.double("column", precision: 3, digits: 5, signed: true, optional: true)

let sql = builder.schema.sql
let serializer = MySQLSerializer(sql: sql)
Expand Down

0 comments on commit dd425f4

Please sign in to comment.