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

Swift4toolchain #11

Open
wants to merge 52 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
b30719c
Updated for latest swift release
nicholasjackson Mar 21, 2017
02938b1
Updated xcode project
nicholasjackson Mar 21, 2017
8a896a1
Major refactor, breaking API changes
nicholasjackson Jul 31, 2017
d4f9392
Merge pull request #1 from nicholasjackson/refactor
nicholasjackson Jul 31, 2017
6b81526
Update README.md
nicholasjackson Jul 31, 2017
6c36eb4
Update README.md
nicholasjackson Jul 31, 2017
e78dfc4
Update README.md
nicholasjackson Jul 31, 2017
9450a77
updates to compile on linux
jarrodparkes Aug 1, 2017
94df099
Merge pull request #1 from jarrodparkes/jarrodparkes/build-linux
jarrodparkes Aug 1, 2017
fe955f0
fix test connection and debug info
jarrodparkes Aug 1, 2017
2045127
add timestamp check to integration test
jarrodparkes Aug 1, 2017
b196856
Merge pull request #3 from jarrodparkes/master
nicholasjackson Aug 2, 2017
237762d
parse BLOB types including TEXT
jarrodparkes Aug 2, 2017
e6c604c
test char set
jarrodparkes Aug 3, 2017
1802e20
add tests for charset
jarrodparkes Aug 3, 2017
26e9f0c
Merge pull request #4 from jarrodparkes/master
nicholasjackson Aug 3, 2017
8a9a234
add delete query builder statement
jarrodparkes Aug 3, 2017
6e9c2a6
Merge pull request #5 from jarrodparkes/master
nicholasjackson Aug 4, 2017
5984b19
This is a temporary release to test the new simplified API
nicholasjackson Aug 4, 2017
34e2efe
Reinstated tests, updated docs
nicholasjackson Aug 6, 2017
f43a96e
Added the return of affected rows to correctly determine if an update…
nicholasjackson Aug 9, 2017
0d0b173
updated affected rows to int64
nicholasjackson Aug 9, 2017
988ad0c
Updated MockConnectionPool
nicholasjackson Aug 10, 2017
d297f64
Updated Mock
nicholasjackson Aug 10, 2017
ae260e5
Added default to mock connection
nicholasjackson Aug 10, 2017
a6adae1
Fixed mock
nicholasjackson Aug 10, 2017
e0bae66
Updated docs
nicholasjackson Aug 12, 2017
f859fe7
Added joins to queries
nicholasjackson Aug 20, 2017
d422e2f
Added ability to seek row with an offset
nicholasjackson Aug 23, 2017
26013d8
update readme
jarrodparkes Aug 24, 2017
03cc45c
Added upsert capability
nicholasjackson Aug 25, 2017
f040148
Added integration test for Upsert
nicholasjackson Aug 25, 2017
17f19c6
Updated documentation
nicholasjackson Aug 25, 2017
1260a8c
Merge pull request #6 from jarrodparkes/master
nicholasjackson Aug 25, 2017
ca30423
Added transaction support
nicholasjackson Aug 28, 2017
da307b3
Updated integration test
nicholasjackson Aug 28, 2017
7db208f
Updated to add transaction to tests
nicholasjackson Aug 28, 2017
de65979
Merge pull request #7 from nicholasjackson/transactions
nicholasjackson Aug 28, 2017
aadfd4c
Added typechecking for query builder, added ability to include functions
nicholasjackson Aug 29, 2017
1e4221a
Merge pull request #8 from nicholasjackson/transactions
nicholasjackson Aug 29, 2017
296a53c
Added ability to include parameter as array
nicholasjackson Aug 29, 2017
9110063
Merge branch 'transactions'
nicholasjackson Aug 29, 2017
a048085
Added unit test for mixed parameter query
nicholasjackson Aug 29, 2017
f5a3ff7
add ORDER BY to query builder
jarrodparkes Sep 10, 2017
9611a9c
Merge pull request #9 from jarrodparkes/master
nicholasjackson Sep 13, 2017
5bb4a26
Updated build to work with swift 4
nicholasjackson Sep 29, 2017
8a03224
Updated build to work with swift 4
nicholasjackson Sep 29, 2017
e33331b
Merge branch 'swift4toolchain' of github.com:nicholasjackson/swift-my…
nicholasjackson Sep 29, 2017
50c671b
Added circle build config
nicholasjackson Sep 29, 2017
16966bc
Updated to use swift 4 build
nicholasjackson Sep 29, 2017
0d7008c
Updated tests to work on Linux, added sort order for dictionaries as …
nicholasjackson Oct 3, 2017
4419054
Fixed bug with transposition of values on insert query
nicholasjackson Oct 3, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
jobs:
build:
working_directory: ~/swift-mysql
docker:
- image: ibmcom/swift-ubuntu:4.0
steps:
- checkout
- run: apt-get update && apt-get install -y libmysqlclient-dev
- run: make test_unit
56 changes: 37 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,41 @@
ifeq "$(PLATFORM)" ""
PLATFORM := $(shell uname)
endif

ifeq "$(PLATFORM)" "Darwin"
BUILDCOMMAND := swift build -Xcc -fblocks -Xswiftc -I/usr/local/include -Xlinker -L/usr/local/lib
REPLACECOMMAND := ls > /dev/null
else
BUILDCOMMAND := swift build -Xcc -fblocks
REPLACECOMMAND := sed -i -e 's/MySQL.xctest/MySQLTest.xctest/g' .build/debug.yaml
endif

build: clean
TEST_COMMAND = swift test -Xlinker -L/usr/local/lib

build:
@echo --- Building package
$(BUILDCOMMAND)
test: clean build
swift build -Xlinker -L/usr/local/lib

test_unit: build
@echo --- Running tests
$(REPLACECOMMAND)
swift test

$(TEST_COMMAND) --filter MySQLTests

test_one: build
swift test -Xlinker -L/usr/local/lib --filter ${TEST}

test_integration: build
@echo --- Running integration tests

docker run --name mysqlswift \
-e MYSQL_ROOT_PASSWORD=my-secret-pw \
-d \
-p 3306:3306 mysql

sleep 15

trap '$(TEST_COMMAND) --filter IntegrationTests' EXIT

docker stop mysqlswift
docker rm -v mysqlswift

swiftdocs:
jazzy \
--clean \
--author Nic Jackson \
--author_url https://nicholasjackson.io \
--github_url https://github.com/nicholasjackson/swift-mysql \
--module MySQL \
--output docs/ \

clean:
@echo --- Invoking swift build --clean
swift build --clean
@echo --- Clean build folder
rm -rf .build
25 changes: 25 additions & 0 deletions MySQL.xcodeproj/IntegrationTests_Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
25 changes: 25 additions & 0 deletions MySQL.xcodeproj/MySQLTests_Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
25 changes: 25 additions & 0 deletions MySQL.xcodeproj/MySQL_Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
Loading