Commit Graph

93 Commits

Author SHA1 Message Date
Nathan Harris 16dc4ac1bf Updated unit tests to use new syntax and to remove a bunch of optional crud 2019-03-25 13:37:40 -07:00
Nathan Harris bcc7f71186 Add convenience command methods for Sorted Set with unit tests 2019-03-23 22:29:38 -07:00
Nathan Harris 050ad64eaa Add list convenience commands with unit tests 2019-03-21 19:41:29 -07:00
Nathan Harris 39feecb4cb Add hash convenience commands with unit tests 2019-03-21 16:00:19 -07:00
Nathan Harris 17f77363ae Fix scan method and add unit test 2019-03-21 14:07:15 -07:00
Nathan Harris 4c7fe40419 Add mset, msetnx, mget, incr, incrby, incrbyfloat, decr, and decrby convenience methods with unit tests 2019-03-20 14:13:11 -07:00
Nathan Harris 6b30127f6b Refactor RedisConnection and RedisPipeline into protocols.
Motivation:

The goal of this commit is to make it easier for library users to implement their own types for creating connections and pipelines without losing all of the convenience command extensions.

This also splits executing commands from the concept of a "connection" to make it more swifty in `RedisPipeline`.
2019-03-18 19:48:36 -07:00
Nathan Harris 9f505be4d2 Add echo, ping, and swapdb command extensions with unit tests 2019-03-18 18:59:12 -07:00
Nathan Harris 00bf027330 Add all Set commands with unit tests
This contributes to #10
2019-03-12 23:14:44 -07:00
Nathan Harris 571d7bce02 Housekeeping of code
- Move: `String.convertedToData()` to `NIORedisTests` as a test utility
- Change: URLs in code comments to be Markdown links
- Change: Code comments to be more correct
2019-03-12 14:42:11 -07:00
Nathan Harris 9c5db400b2 Update RESPEncoder to write to ByteBuffer directly
This is to remove the need of allocations with Foundation.Data before writing to the buffer.

We should see an estimated ~10% performance boost to encoding values.
2019-03-12 14:31:42 -07:00
tanner0101 5a831fad05 nio 2 ctx fixes 2019-02-28 22:05:42 -05:00
Nathan Harris 4d9afa5ba0 Update to latest NIO2 changes 2019-02-12 22:45:25 -08:00
Nathan Harris fff2486450 Update RESPConvertible to match proposal.
- Rename: `RESPConvertible` to `RESPValueConvertible`
- Change: `RESPValueConvertible.convertFromRESP(_:)` to be a non-throwing failable initializer
- Rename: `RESPValueConvertible.convertToRESP()` to non-throwing `convertedToRESPValue()`
2019-02-08 16:52:48 -08:00
Nathan Harris e168b6c65e update to latest NIO2 2019-02-06 16:13:51 -08:00
Nathan Harris 148ebdc642 Help compiler in unit tests for type inference 2019-01-17 16:11:21 -08:00
Nathan Harris c54f804ed8 Remove deprecation warnings for Data.init(bytes:) 2019-01-10 11:56:11 -08:00
Nathan Harris 2bb74cad84 Rename ExecutionModel to ThreadOwnershipModel with internal and external cases 2019-01-09 18:28:06 -08:00
Nathan Harris bd4cf7890d Update unit test references for new type names and to cover more test cases 2019-01-09 18:14:24 -08:00
Nathan Harris 19cbadc506 Clarify and make public RESPDecoder 2019-01-09 13:18:28 -08:00
Nathan Harris e01cdf565d Clarify and make public RESPEncoder 2019-01-09 13:10:59 -08:00
Nathan Harris 26e3ac2aab Rename usage of RedisData to RESPValue or just RESP where it makes sense 2019-01-09 13:04:51 -08:00
Nathan Harris a35de887dd Add NIORedisPipeline and RedisPipeline to allow chaining requests and receiving a single response 2019-01-07 19:37:19 -08:00
Nathan Harris bff48ddf0c Fix assertion failure in unit tests 2018-12-22 15:55:26 -08:00
Nathan Harris 5b1377b115 Add convienence methods for "basic" commands 2018-12-22 15:47:33 -08:00
Nathan Harris dcfd81b259 Add NIORedis that handles creating new connections 2018-12-22 14:52:23 -08:00
Nathan Harris cb3b02df79 Rename test folders to match source directory 2018-12-22 14:46:32 -08:00
Nathan Harris e3c850e530 Add RedisDataEncoder with unit tests 2018-12-21 21:17:28 -08:00
Nathan Harris 99463bfcd1 Use SwiftNIO 2.0 development 2018-12-18 22:56:00 -08:00
Nathan Harris ec73231541 Add unit tests tying all RedisDataDecoder together 2018-12-15 14:53:14 -08:00
Nathan Harris 7d69d69869 Cleanup RedisDataDecoder and fully implement ByteToMessageDecoder conformance 2018-12-15 14:09:26 -08:00
Nathan Harris c928204cf0 Fix bulkString bug 2018-12-15 14:01:16 -08:00
Nathan Harris abcab12854 Add RedisError parsing unit test 2018-12-15 00:09:12 -08:00
Nathan Harris 770f5dbd71 Restructure unit tests to handle RedisData and to be more DRY 2018-12-15 00:09:12 -08:00
Nathan Harris 6318e67c10 Slight perf gain from not copying buffers all over and fix test case bug 2018-12-14 17:23:32 -08:00
Nathan Harris 56880971db Add RedisError parsing and usage 2018-12-14 16:39:24 -08:00
Nathan Harris bcc40319cf Add decoding of arrays 2018-12-14 14:22:18 -08:00
Nathan Harris a87ce04e25 Restructured RedisDataDecoder parsing tests 2018-12-14 09:23:49 -08:00
Nathan Harris bde4eda9ab Add bulk string decoding 2018-12-14 09:01:35 -08:00
Nathan Harris 6b5e0c5590 Add RESP integer parsing 2018-12-13 14:56:09 -08:00
Nathan Harris cf10997d5c Add unit tests for top level _parse method with simple strings 2018-12-13 14:16:32 -08:00
Nathan Harris 4daedece46 Add RESP simple string decoding 2018-12-13 14:16:16 -08:00
Nathan Harris 29160cd308 Initial project files commit 2018-12-13 13:34:30 -08:00