Skip to content
This repository was archived by the owner on Jul 11, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
9dbb575
draft
siscia Jul 16, 2019
6dcbed6
fix error when passing through raw pointer, AKA why we <3 types
siscia Jul 18, 2019
ffe00d9
fix return with nice interface
siscia Jul 22, 2019
cdaa1f8
reply_with_array use iterator instead of simple array
siscia Jul 22, 2019
f5e6f2d
create constructor for SQLiteResultIterator
siscia Jul 22, 2019
ad339ae
implement RedisReply for Cursor
siscia Jul 22, 2019
d80e36d
remove old cruft
siscia Jul 22, 2019
ee0615b
implement RedisReply for cursor
siscia Jul 22, 2019
e9ff05d
imports
siscia Jul 22, 2019
46ae503
implement Returner for Cursor as well
siscia Jul 22, 2019
29c9851
Make cursor works
siscia Jul 23, 2019
495bed8
LINT make clippy happy
siscia Jul 23, 2019
9afa84c
move to cursors also for statements
siscia Jul 23, 2019
55ce886
fix warnings
siscia Jul 27, 2019
26a411e
unwrap the result in the working thread, not the main redis thread
siscia Jul 27, 2019
48a6fa5
allow the unrolling of the sqlite result to fail
siscia Jul 27, 2019
cb10bb4
Allow QueryResult to fail for interrupt
siscia Jul 27, 2019
103a687
Implement interrupt from DBKey
siscia Jul 27, 2019
4dcd167
refactor Exec to use more friendly api for blocking stuff
siscia Jul 27, 2019
3c071e4
add and hook interface for passing timeout
siscia Jul 28, 2019
1cfa573
add default timeout error
siscia Jul 28, 2019
b8bbf2d
add timeout to streaming
siscia Jul 28, 2019
f1671b9
add timeout to conversion between cursor and QuerySesult
siscia Jul 28, 2019
ca57de9
create the timeout in the main command thread, making it possible to …
siscia Jul 28, 2019
0c97b4e
simplify ExecStatement
siscia Jul 28, 2019
cef4a84
simplify QueryStatement
siscia Jul 28, 2019
3e1b70e
simplify QueryStatementInto
siscia Jul 28, 2019
b9bc97f
simplify Query
siscia Jul 28, 2019
96b7b5f
simplify QueryInto
siscia Jul 28, 2019
6b61ad8
simplify CreateStatement
siscia Jul 28, 2019
68744d9
simplify UpdateStatement
siscia Jul 28, 2019
76f24f4
simplify DeleteStatement
siscia Jul 28, 2019
4b2cc96
simplify Copy
siscia Jul 28, 2019
568eba4
remove redunt/equal functions
siscia Jul 28, 2019
c1bc003
add travis release
siscia Jul 30, 2019
0249125
add travis build on release
siscia Jul 30, 2019
f9f97fd
debug travis
siscia Jul 30, 2019
36c02b7
create version to deploy
siscia Jul 31, 2019
165421d
create version to deploy
siscia Jul 31, 2019
08ecbe7
more deploy tests
siscia Jul 31, 2019
351b708
almost there, why the terget is not being copied?
siscia Jul 31, 2019
53a7a1c
rc4, clean release on Travis!
siscia Jul 31, 2019
db32c4e
minimal clean up
siscia Jul 31, 2019
cd9026e
Change layout of replies from Vec<Vec<Entity>> to Vec<Entity>
siscia Aug 3, 2019
53e4686
Merge branch 'master' into cleaning_up
siscia Aug 3, 2019
9794eb4
fix clippy
siscia Aug 3, 2019
accf9f0
remove commeted out code
siscia Aug 3, 2019
138b0b2
mark unsafe function as such
siscia Aug 3, 2019
599992b
Merge branch 'cleaning_up' of github.com:RedBeardLab/rediSQL into cle…
siscia Aug 3, 2019
68717da
refactor scopes for easy access to redis_context
siscia Aug 3, 2019
61eced2
better explaination of how to use _rc
siscia Aug 3, 2019
15b5678
fix error with the borrow checkers
siscia Aug 3, 2019
d074239
simplify code
siscia Aug 10, 2019
26cde12
tag rc05
siscia Aug 10, 2019
bfe285a
merge release
siscia Aug 12, 2019
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
75 changes: 29 additions & 46 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,45 @@

services: docker

git:
submodules: false

sudo: required

language: rust
rust:
- stable
- beta
- nightly

- stable
- beta
- nightly
env:
global:
- CRATE_NAME=rediSQL
- CRATE_NAME=rediSQL
script:
- cargo build --verbose --all
- cargo test --verbose --all
- cargo build --verbose --all --release

matrix:
include:

# Linux
- env: TARGET=aarch64-unknown-linux-gnu
- env: TARGET=arm-unknown-linux-gnueabi
- env: TARGET=armv7-unknown-linux-gnueabihf
- env: TARGET=i686-unknown-linux-gnu
- env: TARGET=i686-unknown-linux-musl
- env: TARGET=mips-unknown-linux-gnu
- env: TARGET=mips64-unknown-linux-gnuabi64
- env: TARGET=mips64el-unknown-linux-gnuabi64
- env: TARGET=mipsel-unknown-linux-gnu
- env: TARGET=powerpc-unknown-linux-gnu
- env: TARGET=powerpc64-unknown-linux-gnu
- env: TARGET=powerpc64le-unknown-linux-gnu
- env: TARGET=s390x-unknown-linux-gnu DISABLE_TESTS=1
- env: TARGET=x86_64-unknown-linux-gnu
dist: trusty
- env: TARGET=x86_64-unknown-linux-musl

# OSX
- env: TARGET=i686-apple-darwin
os: osx
- env: TARGET=x86_64-apple-darwin
os: osx

# *BSD
- env: TARGET=i686-unknown-freebsd DISABLE_TESTS=1
- env: TARGET=x86_64-unknown-freebsd DISABLE_TESTS=1
- env: TARGET=x86_64-unknown-netbsd DISABLE_TESTS=1

# Windows
- env: TARGET=x86_64-pc-windows-gnu

# Testing other channels
- env: TARGET=x86_64-unknown-linux-gnu
rust: nightly
- env: TARGET=arm-unknown-linux-gnueabi
- env: TARGET=armv7-unknown-linux-gnueabihf
- env: TARGET=x86_64-unknown-linux-gnu

cache: cargo

notifications:
email:
on_success: never
before_deploy:
- ls $TRAVIS_BUILD_DIR/target/release
- echo "${TRAVIS_BUILD_DIR}/target/release/RediSQL_${TRAVIS_TAG}_${TRAVIS_COMMIT:0:6}_${TARGET}_(release|debug).so"
- cp --verbose $TRAVIS_BUILD_DIR/target/release/libredis_sql.so "${TRAVIS_BUILD_DIR}/target/release/RediSQL_${TRAVIS_TAG}_${TRAVIS_COMMIT:0:6}_${TARGET}_release.so"
- cp --verbose $TRAVIS_BUILD_DIR/target/debug/libredis_sql.so "${TRAVIS_BUILD_DIR}/target/release/RediSQL_${TRAVIS_TAG}_${TRAVIS_COMMIT:0:6}_${TARGET}_debug.so"
- ls $TRAVIS_BUILD_DIR/target/release

deploy:
skip_cleanup: true
provider: releases
api_key:
secure: IFiEcn4ln1fJEKfEUfXtGlq3dV4cl/1r36vMtGnUoOqoSR7yioCsWHszkIM0+KnvD08fC7hMiZSY7K2B5QKbirnbNZ7ha4hEESe+YTQlGETJsrN6EcVTSRJ/jMyY7LE3kHo565R2do5XsFhTz5KymJ562woaAGtYP+qmqj1DBFsDjoxLNzON23o5nnREjKyjDBu4Ie6PNuVm/pMUgjt0Erwhklac2tKvAJUUeT4PTEZ1FEJi3ubYoz0XLbR9wp8Ih3I9YEIOXpaLmoBmo7u8g/wCStSbZSvorssZfIP9uI9Q+VmQj7agMeI4nrm7uOas8uPf/UFFsY41dqKoWhO06XXLAot/PUw3saSpdpIobAtyX9x1SUb2BPs1hPwcoU6Pz/yBntr5xx0yLqdppcWof28t9S4dUeFstAtrkQB0iIjPa7J0JywWVcBQ1iPY1e87QeZKN9GJSf1Gk0B4AhR4ORLskvS8u29w2ZA1ca8PWJ9fokH3JYoYJGE8GtXqMFCW3ENTu953uX2B9f2JntqqYtFX8bk+YxpO/uBY+aAFS59ApCWhQDshx1zMzFLwqSxIpz5Qkgddso50L8Az39Kx1Due0V0FnO4G72q6rzSQayrAhxLdDF3z5xcvbjbsYrSAue5Ly5Y814D5ywKJMsjlGzz4JTNJjSvfChWihHwW61w=
file_glob: true
file: $TRAVIS_BUILD_DIR/target/release/RediSQL_*.so
on:
repo: RedBeardLab/rediSQL
branch: timeout_honor
tags: true
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rediSQL"
version = "1.0.3-rc02"
version = "1.1.0"
authors = ["Simone Mosciatti <simone@redbeardlab.tech>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion redisql_lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "redisql_lib"
version = "0.5.5-rc02"
version = "0.6.0"
authors = ["Simone Mosciatti <mweb.sim@gmail.com>"]
edition = "2018"

Expand Down
23 changes: 16 additions & 7 deletions redisql_lib/src/community_statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ enum Parameters {
Named { index: i32 },
}

#[derive(Clone)]
pub struct MultiStatement {
stmts: Vec<Statement>,
db: Arc<Mutex<RawConnection>>,
Expand All @@ -38,12 +39,17 @@ impl<'a> fmt::Display for MultiStatement {
}
}

#[derive(Clone)]
pub struct Statement {
stmt: Arc<InternalStatement>,
}

struct InternalStatement {
stmt: ptr::NonNull<ffi::sqlite3_stmt>,
}

unsafe impl Send for Statement {}
unsafe impl Sync for Statement {}
unsafe impl Send for InternalStatement {}
unsafe impl Sync for InternalStatement {}

impl<'a> fmt::Display for Statement {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
Expand All @@ -56,10 +62,10 @@ impl<'a> fmt::Display for Statement {
}
}

impl<'a> Drop for Statement {
impl<'a> Drop for InternalStatement {
fn drop(&mut self) {
unsafe {
ffi::sqlite3_finalize(self.as_ptr());
ffi::sqlite3_finalize(self.stmt.as_ptr());
};
}
}
Expand Down Expand Up @@ -120,7 +126,9 @@ pub fn generate_statements(
impl Statement {
fn from_ptr(stmt: *mut ffi::sqlite3_stmt) -> Self {
Statement {
stmt: ptr::NonNull::new(stmt).unwrap(),
stmt: Arc::new(InternalStatement {
stmt: ptr::NonNull::new(stmt).unwrap(),
}),
}
}
fn execute(
Expand All @@ -139,7 +147,7 @@ impl Statement {
ffi::sqlite3_column_count(self.as_ptr())
} as i32;
Ok(Cursor::RowsCursor {
stmt: self,
stmt: self.clone(),
num_columns,
previous_status: ffi::SQLITE_ROW,
modified_rows: 0,
Expand All @@ -154,7 +162,7 @@ impl Statement {
rc.get_last_error()
}
pub fn as_ptr(&self) -> *mut ffi::sqlite3_stmt {
self.stmt.as_ptr()
self.stmt.stmt.as_ptr()
}
}

Expand Down Expand Up @@ -403,6 +411,7 @@ fn count_parameters(
}
}
}

fn get_parameter_name(
stmt: &Statement,
index: i32,
Expand Down
Loading