Skip to content

Commit 3e6b147

Browse files
committed
Modernize Travis and badges
Also change type of error in 0.4
1 parent ec76634 commit 3e6b147

File tree

3 files changed

+20
-26
lines changed

3 files changed

+20
-26
lines changed

.travis.yml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
1-
language: cpp
2-
compiler:
3-
- clang
1+
language: julia
2+
os:
3+
- osx
4+
- linux
5+
julia:
6+
- release
7+
- nightly
48
notifications:
59
email: false
6-
env:
7-
- JULIAVERSION="juliareleases"
8-
- JULIAVERSION="julianightlies"
9-
before_install:
10-
- sudo add-apt-repository ppa:staticfloat/julia-deps -y
11-
- sudo add-apt-repository ppa:staticfloat/${JULIAVERSION} -y
12-
- sudo apt-get update -qq -y
13-
- sudo apt-get install libpcre3-dev julia -y
14-
- git config --global user.name "Travis User"
15-
- git config --global user.email "[email protected]"
16-
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
1710
script:
18-
- julia -e 'Pkg.init(); Pkg.clone(pwd()); Pkg.build("SQLite")'
19-
- julia -e 'Pkg.test("SQLite", coverage=true)'
20-
after_success:
21-
- julia -e 'cd(Pkg.dir("SQLite")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
11+
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
12+
- julia -e 'Pkg.clone(pwd()); Pkg.build("SQLite"); Pkg.test("SQLite"; coverage=true)';
13+
- julia -e 'cd(Pkg.dir("SQLite")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())';

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
SQLite.jl
22
=========
33

4+
[![SQLite on Julia release](http://pkg.julialang.org/badges/SQLite_release.svg)](http://pkg.julialang.org/?pkg=SQLite&ver=release)
5+
[![SQLite on Julia nightly](http://pkg.julialang.org/badges/SQLite_nightly.svg)](http://pkg.julialang.org/?pkg=SQLite&ver=nightly)
46
[![Build Status](https://travis-ci.org/quinnj/SQLite.jl.png)](https://travis-ci.org/quinnj/SQLite.jl)
57
[![Coverage Status](https://img.shields.io/coveralls/quinnj/SQLite.jl.svg)](https://coveralls.io/r/quinnj/SQLite.jl)
6-
[![SQLite](http://pkg.julialang.org/badges/SQLite_release.svg)](http://pkg.julialang.org/?pkg=SQLite&ver=release)
78

89
A Julia interface to the SQLite library and support for operations on DataFrames
910

@@ -56,7 +57,7 @@ A Julia interface to the SQLite library and support for operations on DataFrames
5657
Used to execute prepared `SQLiteStmt`. The 2nd method is a convenience method to pass in an SQL statement as a string which gets prepared and executed in one call. This method does not check for or return any results, hence it is only useful for database manipulation methods (i.e. ALTER, CREATE, UPDATE, DROP). To return results, see `query` below. Also consider the `create`, `drop`, and `append` methods for manipulation statements as further SQLite performance tricks are incorporated automatically.
5758

5859
* `query(db::SQLiteDB, sql::String, values=[])`
59-
60+
6061
An SQL statement `sql` is prepared, executed in the context of `db`, and results, if any, are returned. The return values are a `(String[],Any[])` tuple representing `(column names, result values)`.
6162

6263
The values in `values` are used in parameter binding (see `bind` above). If your statement uses nameless parameters `values` must be a `Vector` of the values you wish to bind to your statment. If your statement uses named parameters `values` must be a Dict where the keys are of type `Symbol`. The key must match an identifier name in the statement (the name **does not** include the ':', '@' or '$' prefix).

test/runtests.jl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ if VERSION < v"0.4.0-dev"
88
const UInt64 = Uint64
99
const UInt128 = Uint128
1010
const UInt = Uint
11+
typealias AssertionError ErrorException
1112
end
1213

1314
a = SQLiteDB()
@@ -41,9 +42,9 @@ results = query(db,"SELECT * FROM Employee;")
4142
@test results[1,5] == NULL
4243

4344
query(db,"SELECT * FROM Album;")
44-
query(db,"SELECT a.*, b.AlbumId
45-
FROM Artist a
46-
LEFT OUTER JOIN Album b ON b.ArtistId = a.ArtistId
45+
query(db,"SELECT a.*, b.AlbumId
46+
FROM Artist a
47+
LEFT OUTER JOIN Album b ON b.ArtistId = a.ArtistId
4748
ORDER BY name;")
4849

4950
EMPTY_RESULTSET = ResultSet(["Rows Affected"],Any[Any[0]])
@@ -168,13 +169,13 @@ end
168169
r = query(db, sr"SELECT LastName FROM Employee WHERE BirthDate REGEXP '^\d{4}-08'")
169170
@test r.values[1][1] == "Peacock"
170171

171-
triple(x) = x * 3
172-
@test_throws ErrorException SQLite.register(db, triple, nargs=186)
172+
triple(x) = 3x
173+
@test_throws AssertionError SQLite.register(db, triple, nargs=186)
173174
SQLite.register(db, triple, nargs=1)
174175
r = query(db, "SELECT triple(Total) FROM Invoice ORDER BY InvoiceId LIMIT 5")
175176
s = query(db, "SELECT Total FROM Invoice ORDER BY InvoiceId LIMIT 5")
176177
for (i, j) in zip(r.values[1], s.values[1])
177-
@test_approx_eq i j*3
178+
@test_approx_eq i 3j
178179
end
179180

180181
SQLite.@register db function add4(q)

0 commit comments

Comments
 (0)