jylis-rb 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +221 -0
  3. data/doc/Jylis.html +1087 -6
  4. data/doc/Jylis/Connection.html +1128 -0
  5. data/doc/Jylis/Connection/HostMissingError.html +135 -0
  6. data/doc/Jylis/Connection/UnsupportedSchemaError.html +135 -0
  7. data/doc/Jylis/DataType.html +135 -0
  8. data/doc/Jylis/DataType/Base.html +346 -0
  9. data/doc/Jylis/DataType/GCOUNT.html +331 -0
  10. data/doc/Jylis/DataType/GCOUNT/Result.html +132 -0
  11. data/doc/Jylis/DataType/MVREG.html +318 -0
  12. data/doc/Jylis/DataType/PNCOUNT.html +404 -0
  13. data/doc/Jylis/DataType/TLOG.html +750 -0
  14. data/doc/Jylis/DataType/TLOG/Result.html +640 -0
  15. data/doc/Jylis/DataType/TLOG/Row.html +616 -0
  16. data/doc/Jylis/DataType/TREG.html +345 -0
  17. data/doc/Jylis/DataType/TREG/Result.html +616 -0
  18. data/doc/Jylis/DataType/UJSON.html +549 -0
  19. data/doc/_index.html +185 -4
  20. data/doc/class_list.html +1 -1
  21. data/doc/file.README.html +223 -3
  22. data/doc/file.license.html +3 -3
  23. data/doc/frames.html +1 -1
  24. data/doc/index.html +223 -3
  25. data/doc/method_list.html +512 -0
  26. data/doc/top-level-namespace.html +3 -3
  27. data/lib/jylis-rb.rb +9 -0
  28. data/lib/jylis-rb/connection.rb +121 -0
  29. data/lib/jylis-rb/data_types/base.rb +24 -0
  30. data/lib/jylis-rb/data_types/gcount.rb +24 -0
  31. data/lib/jylis-rb/data_types/mvreg.rb +23 -0
  32. data/lib/jylis-rb/data_types/pncount.rb +33 -0
  33. data/lib/jylis-rb/data_types/tlog.rb +157 -0
  34. data/lib/jylis-rb/data_types/treg.rb +57 -0
  35. data/lib/jylis-rb/data_types/ujson.rb +87 -0
  36. data/lib/jylis-rb/jylis.rb +106 -0
  37. data/lib/jylis-rb/version.rb +1 -1
  38. metadata +39 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96c30037533c2d352d4a385f753d149d0c537a2ec528b4c44c9e068d199f7d5b
4
- data.tar.gz: db547bd9b48b4f3b1473e5f1a5a801d7cf620792f6a9a6f71e3e8e2ae0c92484
3
+ metadata.gz: 41185cdd95d1e64b87795154c5faf305e3cb779a40ac700c7dfd2cbf72ee612a
4
+ data.tar.gz: 3bac8f3e7f9e452b728125692b8f6e774e9a3385fc37a22fc903e24b444ee7cc
5
5
  SHA512:
6
- metadata.gz: f9434d2675f8a33b626c20bb37b48ff6009d628024ec47fc095f49f7bab8a14f83d672ea33c484bc6317542c9ccea07b439a5fe14060ec876f103d6d8b9c7f65
7
- data.tar.gz: afe761467bcb2e92dba77ce8d56dc0687b93d8679b1dbd7a1cfc440a0f542b19a0673e9c948f3ab887a1476df0b059cd0a429ba889ad637aa408c8d5d174882c
6
+ metadata.gz: 7c4f4eea104188d50d6c87357aadcdd6892191315792a244d408a91124017959d322f95623c4be4c66eb46430d8949ae45c574594e723bcb48d8fe950ccb0a5b
7
+ data.tar.gz: 895123f2fbdfbc566b32874fc4a0741a78166128401918224090379aa15ee00435acf41d2913f269e06cd7eda91abe3b825b6e81b7ab62ccd53635fc55d02f96
data/README.md CHANGED
@@ -1,7 +1,228 @@
1
1
  # jylis-rb
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/jylis-rb.svg)](https://badge.fury.io/rb/jylis-rb)
4
+ [![Coverage Status](https://coveralls.io/repos/github/amclain/jylis-rb/badge.svg?branch=master)](https://coveralls.io/github/amclain/jylis-rb?branch=master)
5
+ [![API Documentation](http://img.shields.io/badge/docs-api-blue.svg)](http://www.rubydoc.info/gems/jylis-rb)
6
+ [![MIT License](https://img.shields.io/badge/license-MIT-yellowgreen.svg)](https://github.com/amclain/jylis-rb/blob/master/license.txt)
7
+
3
8
  An idiomatic library for connecting a Ruby project to a
4
9
  [Jylis](https://github.com/jemc/jylis) database.
5
10
 
6
11
  > Jylis is a distributed in-memory database for Conflict-free Replicated Data
7
12
  > Types (CRDTs), built for speed, scalability, availability, and ease of use.
13
+
14
+ ## Installation
15
+
16
+ Install this library from the Ruby package manager with the following command:
17
+
18
+ ```text
19
+ $ gem install jylis-rb
20
+ ```
21
+
22
+ Add the following `require` to your project:
23
+
24
+ ```ruby
25
+ require 'jylis-rb'
26
+ ```
27
+
28
+ The library is now ready for use.
29
+
30
+ ### Installing From Source
31
+
32
+ If you choose not to use a version of the gem provided by the package manager,
33
+ you may alternatively install this library from the source code. This section
34
+ can be skipped if you have already installed the gem from the package manager.
35
+
36
+ Ensure `bundler` and `rake` are installed:
37
+
38
+ ```text
39
+ $ gem install bundler
40
+ $ gem install rake
41
+ ```
42
+
43
+ Clone the repository and navigate inside the project directory:
44
+
45
+ ```text
46
+ $ git clone git@github.com:amclain/jylis-rb.git
47
+ $ cd jylis-rb
48
+ ```
49
+
50
+ Install the dependencies:
51
+
52
+ ```text
53
+ $ bundle install
54
+ ```
55
+
56
+ Ensure the tests pass:
57
+
58
+ ```text
59
+ $ rake
60
+ ```
61
+
62
+ Install the gem from the working source code:
63
+
64
+ ```text
65
+ $ rake install
66
+ ```
67
+
68
+ ## Database Connection
69
+
70
+ The connection URI must be specified in the format: `schema://host:port`, where
71
+ the schema is `jylis`. The `host` can be a host name, IP address, or domain name
72
+ of the database host to connect to. The `port` is optional and defaults to
73
+ `6379` unless otherwise specified.
74
+
75
+ ```ruby
76
+ Jylis.connect("jylis://host:port")
77
+ ```
78
+
79
+ ## Queries
80
+
81
+ This library aims to be idiomatic with both Ruby and Jylis. Therefore, the
82
+ syntax of the queries closely match the [Jylis documentation](https://jemc.github.io/jylis/docs/types/)
83
+ and ideally it should feel so natural to you, a Ruby programmer, that you don't
84
+ need to read the documentation for this library (although this library is
85
+ thoroughly documented in the case that you do).
86
+
87
+ For example, take the case of a Jylis query to set a value for a
88
+ [`UJSON`](https://jemc.github.io/jylis/docs/types/ujson/#set-key-key-ujson) key:
89
+
90
+ ```text
91
+ UJSON SET fruit apple properties '{"color": "red", "ripe": true}'
92
+ ```
93
+
94
+ Using this library, the query looks like this:
95
+
96
+ ```ruby
97
+ Jylis.ujson.set "fruit", "apple", "properties", {color: "red", ripe: true}
98
+ ```
99
+
100
+ The format for a query is:
101
+
102
+ ```text
103
+ Jylis.<data_type>.<function> key(s), [value], [timestamp]
104
+ ```
105
+
106
+ However, be sure to consult the [API documentation](http://www.rubydoc.info/gems/jylis-rb)
107
+ or the [Jylis documentation](https://jemc.github.io/jylis/docs/types/) for the
108
+ exact format of your particular query.
109
+
110
+ ### TREG
111
+
112
+ Timestamped Register <sup>[[link](https://jemc.github.io/jylis/docs/types/treg/)]</sup>
113
+
114
+ ```ruby
115
+ Jylis.treg.set "lamp_brightness", 80, 1528082143
116
+
117
+ result = Jylis.treg.get "lamp_brightness"
118
+ # => #<Jylis::DataType::TREG::Result:0x00005598dd3941c8 @timestamp=1528082143, @value="80">
119
+
120
+ result.value
121
+ # => "80"
122
+ result.timestamp
123
+ # => 1528082143
124
+ ```
125
+
126
+ ### TLOG
127
+
128
+ Timestamped Log <sup>[[link](https://jemc.github.io/jylis/docs/types/tlog/)]</sup>
129
+
130
+ ```ruby
131
+ Jylis.tlog.ins "temperature", 68.8, 1528082150
132
+ Jylis.tlog.ins "temperature", 70.1, 1528082160
133
+ Jylis.tlog.ins "temperature", 73.6, 1528082170
134
+
135
+ Jylis.tlog.size "temperature"
136
+ # => 3
137
+
138
+ result = Jylis.tlog.get "temperature"
139
+ # => #<Jylis::DataType::TLOG::Result:0x00005598dd345d20
140
+ # @rows=
141
+ # [#<Jylis::DataType::TLOG::Row:0x00005598dd345d98 @timestamp=1528082170, @value="73.6">,
142
+ # #<Jylis::DataType::TLOG::Row:0x00005598dd345d70 @timestamp=1528082160, @value="70.1">,
143
+ # #<Jylis::DataType::TLOG::Row:0x00005598dd345d48 @timestamp=1528082150, @value="68.8">]>
144
+
145
+ result.first.value
146
+ # => "73.6"
147
+ result.first.timestamp
148
+ # => 1528082170
149
+
150
+ Jylis.tlog.trim "temperature", 1
151
+
152
+ Jylis.tlog.get "temperature"
153
+ # => #<Jylis::DataType::TLOG::Result:0x00005598dd2faac8
154
+ # @rows=[#<Jylis::DataType::TLOG::Row:0x00005598dd2faaf0 @timestamp=1528082170, @value="73.6">]>
155
+
156
+ Jylis.tlog.cutoff "temperature"
157
+ # => 1528082170
158
+ ```
159
+
160
+ ### GCOUNT
161
+
162
+ Grow-Only Counter <sup>[[link](https://jemc.github.io/jylis/docs/types/gcount/)]</sup>
163
+
164
+ ```ruby
165
+ Jylis.gcount.inc "mileage", 10
166
+ Jylis.gcount.inc "mileage", 5
167
+
168
+ Jylis.gcount.get "mileage"
169
+ # => 15
170
+ ```
171
+
172
+ ### PNCOUNT
173
+
174
+ Positive/Negative Counter <sup>[[link](https://jemc.github.io/jylis/docs/types/pncount/)]</sup>
175
+
176
+ ```ruby
177
+ Jylis.pncount.inc "subscribers", 3
178
+ Jylis.pncount.dec "subscribers", 1
179
+
180
+ Jylis.pncount.get "subscribers"
181
+ # => 2
182
+ ```
183
+
184
+ ### MVREG
185
+
186
+ Multi-Value Register <sup>[[link](https://jemc.github.io/jylis/docs/types/mvreg/)]</sup>
187
+
188
+ ```ruby
189
+ Jylis.mvreg.set "thermostat", 68
190
+
191
+ Jylis.mvreg.get "thermostat"
192
+ # => ["68"]
193
+ ```
194
+
195
+ ### UJSON
196
+
197
+ Unordered JSON <sup>[[link](https://jemc.github.io/jylis/docs/types/ujson/)]</sup>
198
+
199
+ ```ruby
200
+ Jylis.ujson.set "users", "alice", "admin", false
201
+ Jylis.ujson.set "users", "brett", "admin", false
202
+ Jylis.ujson.set "users", "carol", "admin", true
203
+
204
+ Jylis.ujson.get "users"
205
+ # => {"brett"=>{"admin"=>false}, "carol"=>{"admin"=>true}, "alice"=>{"admin"=>false}}
206
+
207
+ Jylis.ujson.ins "users", "brett", "banned", true
208
+
209
+ Jylis.ujson.clr "users", "alice"
210
+
211
+ Jylis.ujson.get "users"
212
+ # => {"brett"=>{"banned"=>true, "admin"=>false}, "carol"=>{"admin"=>true}}
213
+ ```
214
+
215
+ ### Raw Query
216
+
217
+ If this library doesn't contain a method for the query you would like to
218
+ perform, you can construct the query yourself by calling `Jylis.query`.
219
+ However, be aware that this method is non-idiomatic and may require you to
220
+ do your own pre/post processing on the data.
221
+
222
+ ```ruby
223
+ Jylis.query "TLOG", "INS", "temperature", 72.6, 5
224
+ # => "OK"
225
+
226
+ Jylis.query "TLOG", "GET", "temperature"
227
+ # => [["72.6", 5]]
228
+ ```
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Jylis
8
8
 
9
- &mdash; Documentation by YARD 0.9.13
9
+ &mdash; Documentation by YARD 0.9.14
10
10
 
11
11
  </title>
12
12
 
@@ -95,7 +95,7 @@
95
95
  <dl>
96
96
  <dt>Defined in:</dt>
97
97
  <dd>lib/jylis-rb/jylis.rb<span class="defines">,<br />
98
- lib/jylis-rb/version.rb</span>
98
+ lib/jylis-rb/version.rb,<br /> lib/jylis-rb/connection.rb,<br /> lib/jylis-rb/data_types/base.rb,<br /> lib/jylis-rb/data_types/tlog.rb,<br /> lib/jylis-rb/data_types/treg.rb,<br /> lib/jylis-rb/data_types/mvreg.rb,<br /> lib/jylis-rb/data_types/ujson.rb,<br /> lib/jylis-rb/data_types/gcount.rb,<br /> lib/jylis-rb/data_types/pncount.rb</span>
99
99
  </dd>
100
100
  </dl>
101
101
 
@@ -112,7 +112,19 @@
112
112
  <div class="tags">
113
113
 
114
114
 
115
- </div>
115
+ </div><h2>Defined Under Namespace</h2>
116
+ <p class="children">
117
+
118
+
119
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Jylis/DataType.html" title="Jylis::DataType (module)">DataType</a></span>
120
+
121
+
122
+
123
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Jylis/Connection.html" title="Jylis::Connection (class)">Connection</a></span>
124
+
125
+
126
+ </p>
127
+
116
128
 
117
129
  <h2>
118
130
  Constant Summary
@@ -135,7 +147,7 @@
135
147
 
136
148
  </div>
137
149
  </dt>
138
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.0.1</span><span class='tstring_end'>&quot;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
150
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.1.0</span><span class='tstring_end'>&quot;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
139
151
 
140
152
  </dl>
141
153
 
@@ -143,17 +155,1086 @@
143
155
 
144
156
 
145
157
 
158
+ <h2>Class Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
159
+ <ul class="summary">
160
+
161
+ <li class="public ">
162
+ <span class="summary_signature">
163
+
164
+ <a href="#current-class_method" title="current (class method)">.<strong>current</strong> &#x21d2; Object </a>
165
+
166
+
167
+
168
+ </span>
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+ <span class="summary_desc"><div class='inline'>
182
+ <p>The current connection.</p>
183
+ </div></span>
184
+
185
+ </li>
186
+
187
+
188
+ </ul>
189
+
190
+
191
+
192
+
193
+
194
+ <h2>
195
+ Data Types
196
+ <small><a href="#" class="summary_toggle">collapse</a></small>
197
+ </h2>
198
+
199
+ <ul class="summary">
200
+
201
+ <li class="public ">
202
+ <span class="summary_signature">
203
+
204
+ <a href="#gcount-class_method" title="gcount (class method)">.<strong>gcount</strong> &#x21d2; Jylis::DataType::GCOUNT </a>
205
+
206
+
207
+
208
+ </span>
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+ <span class="summary_desc"><div class='inline'>
219
+ <p>GCOUNT functions.</p>
220
+ </div></span>
221
+
222
+ </li>
223
+
224
+
225
+ <li class="public ">
226
+ <span class="summary_signature">
227
+
228
+ <a href="#mvreg-class_method" title="mvreg (class method)">.<strong>mvreg</strong> &#x21d2; Jylis::DataType::MVREG </a>
229
+
230
+
231
+
232
+ </span>
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+ <span class="summary_desc"><div class='inline'>
243
+ <p>MVREG functions.</p>
244
+ </div></span>
245
+
246
+ </li>
247
+
248
+
249
+ <li class="public ">
250
+ <span class="summary_signature">
251
+
252
+ <a href="#pncount-class_method" title="pncount (class method)">.<strong>pncount</strong> &#x21d2; Jylis::DataType::PNCOUNT </a>
253
+
254
+
255
+
256
+ </span>
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+ <span class="summary_desc"><div class='inline'>
267
+ <p>PNCOUNT functions.</p>
268
+ </div></span>
269
+
270
+ </li>
271
+
272
+
273
+ <li class="public ">
274
+ <span class="summary_signature">
275
+
276
+ <a href="#tlog-class_method" title="tlog (class method)">.<strong>tlog</strong> &#x21d2; Jylis::DataType::TLOG </a>
277
+
278
+
279
+
280
+ </span>
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+ <span class="summary_desc"><div class='inline'>
291
+ <p>TLOG functions.</p>
292
+ </div></span>
293
+
294
+ </li>
295
+
296
+
297
+ <li class="public ">
298
+ <span class="summary_signature">
299
+
300
+ <a href="#treg-class_method" title="treg (class method)">.<strong>treg</strong> &#x21d2; Jylis::DataType::TREG </a>
301
+
302
+
303
+
304
+ </span>
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+ <span class="summary_desc"><div class='inline'>
315
+ <p>TREG functions.</p>
316
+ </div></span>
317
+
318
+ </li>
319
+
320
+
321
+ <li class="public ">
322
+ <span class="summary_signature">
323
+
324
+ <a href="#ujson-class_method" title="ujson (class method)">.<strong>ujson</strong> &#x21d2; Jylis::DataType::UJSON </a>
325
+
326
+
327
+
328
+ </span>
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+ <span class="summary_desc"><div class='inline'>
339
+ <p>UJSON functions.</p>
340
+ </div></span>
341
+
342
+ </li>
343
+
344
+
345
+ </ul>
346
+
347
+ <h2>
348
+ Class Method Summary
349
+ <small><a href="#" class="summary_toggle">collapse</a></small>
350
+ </h2>
351
+
352
+ <ul class="summary">
353
+
354
+ <li class="public ">
355
+ <span class="summary_signature">
356
+
357
+ <a href="#connect-class_method" title="connect (class method)">.<strong>connect</strong>(server_uri) &#x21d2; Jylis::Connection </a>
358
+
359
+
360
+
361
+ </span>
362
+
363
+
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+ <span class="summary_desc"><div class='inline'>
372
+ <p>Connect to a server and store the current connection.</p>
373
+ </div></span>
374
+
375
+ </li>
376
+
377
+
378
+ <li class="public ">
379
+ <span class="summary_signature">
380
+
381
+ <a href="#connected%3F-class_method" title="connected? (class method)">.<strong>connected?</strong> &#x21d2; Boolean </a>
382
+
383
+
384
+
385
+ </span>
386
+
387
+
388
+
389
+
390
+
391
+
392
+
393
+
394
+
395
+ <span class="summary_desc"><div class='inline'>
396
+ <p>True if a connection to the current server is established.</p>
397
+ </div></span>
398
+
399
+ </li>
400
+
401
+
402
+ <li class="public ">
403
+ <span class="summary_signature">
404
+
405
+ <a href="#disconnect-class_method" title="disconnect (class method)">.<strong>disconnect</strong> &#x21d2; Object </a>
406
+
407
+
408
+
409
+ </span>
410
+
411
+
412
+
413
+
414
+
415
+
416
+
417
+
418
+
419
+ <span class="summary_desc"><div class='inline'>
420
+ <p>Disconnect from the current server.</p>
421
+ </div></span>
422
+
423
+ </li>
424
+
425
+
426
+ <li class="public ">
427
+ <span class="summary_signature">
428
+
429
+ <a href="#query-class_method" title="query (class method)">.<strong>query</strong>(*args) &#x21d2; Array </a>
430
+
431
+
432
+
433
+ </span>
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+ <span class="summary_desc"><div class='inline'>
444
+ <p>Make a query to the database.</p>
445
+ </div></span>
446
+
447
+ </li>
448
+
449
+
450
+ <li class="public ">
451
+ <span class="summary_signature">
452
+
453
+ <a href="#reconnect-class_method" title="reconnect (class method)">.<strong>reconnect</strong> &#x21d2; Object </a>
454
+
455
+
456
+
457
+ </span>
458
+
459
+
460
+
461
+
462
+
463
+
464
+
465
+
466
+
467
+ <span class="summary_desc"><div class='inline'>
468
+ <p>Reconnect to the current server.</p>
469
+ </div></span>
470
+
471
+ </li>
472
+
473
+
474
+ </ul>
475
+
476
+
477
+
478
+ <div id="class_attr_details" class="attr_details">
479
+ <h2>Class Attribute Details</h2>
480
+
481
+
482
+ <span id="current=-class_method"></span>
483
+ <div class="method_details first">
484
+ <h3 class="signature first" id="current-class_method">
485
+
486
+ .<strong>current</strong> &#x21d2; <tt>Object</tt>
487
+
488
+
489
+
490
+
491
+
492
+ </h3><div class="docstring">
493
+ <div class="discussion">
494
+
495
+ <p>The current connection.</p>
496
+
497
+
498
+ </div>
499
+ </div>
500
+ <div class="tags">
501
+
502
+
503
+ </div><table class="source_code">
504
+ <tr>
505
+ <td>
506
+ <pre class="lines">
507
+
146
508
 
509
+ 10
510
+ 11
511
+ 12</pre>
512
+ </td>
513
+ <td>
514
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 10</span>
147
515
 
516
+ <span class='kw'>def</span> <span class='id identifier rubyid_current'>current</span>
517
+ <span class='ivar'>@current</span>
518
+ <span class='kw'>end</span></pre>
519
+ </td>
520
+ </tr>
521
+ </table>
522
+ </div>
523
+
524
+ </div>
525
+
526
+
527
+ <div id="class_method_details" class="method_details_list">
528
+ <h2>Class Method Details</h2>
529
+
530
+
531
+ <div class="method_details first">
532
+ <h3 class="signature first" id="connect-class_method">
533
+
534
+ .<strong>connect</strong>(server_uri) &#x21d2; <tt><span class='object_link'><a href="Jylis/Connection.html" title="Jylis::Connection (class)">Jylis::Connection</a></span></tt>
535
+
536
+
537
+
538
+
539
+
540
+ </h3><div class="docstring">
541
+ <div class="discussion">
542
+
543
+ <p>Connect to a server and store the current connection.</p>
148
544
 
149
545
 
546
+ </div>
547
+ </div>
548
+ <div class="tags">
549
+ <p class="tag_title">Parameters:</p>
550
+ <ul class="param">
551
+
552
+ <li>
553
+
554
+ <span class='name'>server_uri</span>
555
+
556
+
557
+ <span class='type'>(<tt>URI</tt>, <tt>String</tt>)</span>
558
+
559
+
560
+
561
+ &mdash;
562
+ <div class='inline'>
563
+ <p>uri of the server to connect to</p>
564
+ </div>
565
+
566
+ </li>
567
+
568
+ </ul>
569
+
570
+ <p class="tag_title">Returns:</p>
571
+ <ul class="return">
572
+
573
+ <li>
574
+
575
+
576
+ <span class='type'>(<tt><span class='object_link'><a href="Jylis/Connection.html" title="Jylis::Connection (class)">Jylis::Connection</a></span></tt>)</span>
577
+
578
+
579
+
580
+ &mdash;
581
+ <div class='inline'>
582
+ <p>connection</p>
583
+ </div>
584
+
585
+ </li>
586
+
587
+ </ul>
588
+
589
+ </div><table class="source_code">
590
+ <tr>
591
+ <td>
592
+ <pre class="lines">
593
+
594
+
595
+ 17
596
+ 18
597
+ 19
598
+ 20
599
+ 21</pre>
600
+ </td>
601
+ <td>
602
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 17</span>
603
+
604
+ <span class='kw'>def</span> <span class='id identifier rubyid_connect'>connect</span><span class='lparen'>(</span><span class='id identifier rubyid_server_uri'>server_uri</span><span class='rparen'>)</span>
605
+ <span class='id identifier rubyid_disconnect'>disconnect</span> <span class='kw'>if</span> <span class='id identifier rubyid_current'>current</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_connected?'>connected?</span>
606
+
607
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_current'>current</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="Jylis (class)">Jylis</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Jylis/Connection.html" title="Jylis::Connection (class)">Connection</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Jylis/Connection.html#initialize-instance_method" title="Jylis::Connection#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_server_uri'>server_uri</span><span class='rparen'>)</span>
608
+ <span class='kw'>end</span></pre>
609
+ </td>
610
+ </tr>
611
+ </table>
612
+ </div>
613
+
614
+ <div class="method_details ">
615
+ <h3 class="signature " id="connected?-class_method">
616
+
617
+ .<strong>connected?</strong> &#x21d2; <tt>Boolean</tt>
618
+
619
+
620
+
621
+
622
+
623
+ </h3><div class="docstring">
624
+ <div class="discussion">
625
+
626
+ <p>Returns true if a connection to the current server is established</p>
627
+
628
+
629
+ </div>
630
+ </div>
631
+ <div class="tags">
632
+
633
+ <p class="tag_title">Returns:</p>
634
+ <ul class="return">
635
+
636
+ <li>
637
+
638
+
639
+ <span class='type'>(<tt>Boolean</tt>)</span>
640
+
641
+
642
+
643
+ &mdash;
644
+ <div class='inline'>
645
+ <p>true if a connection to the current server is established</p>
646
+ </div>
647
+
648
+ </li>
649
+
650
+ </ul>
651
+
652
+ <p class="tag_title">See Also:</p>
653
+ <ul class="see">
654
+
655
+ <li><span class='object_link'><a href="Jylis/Connection.html#connected%3F-instance_method" title="Jylis::Connection#connected? (method)">Jylis::Connection#connected?</a></span></li>
656
+
657
+ </ul>
658
+
659
+ </div><table class="source_code">
660
+ <tr>
661
+ <td>
662
+ <pre class="lines">
663
+
664
+
665
+ 25
666
+ 26
667
+ 27</pre>
668
+ </td>
669
+ <td>
670
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 25</span>
671
+
672
+ <span class='kw'>def</span> <span class='id identifier rubyid_connected?'>connected?</span>
673
+ <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_connected?'>connected?</span>
674
+ <span class='kw'>end</span></pre>
675
+ </td>
676
+ </tr>
677
+ </table>
678
+ </div>
679
+
680
+ <div class="method_details ">
681
+ <h3 class="signature " id="disconnect-class_method">
682
+
683
+ .<strong>disconnect</strong> &#x21d2; <tt>Object</tt>
684
+
685
+
686
+
687
+
688
+
689
+ </h3><div class="docstring">
690
+ <div class="discussion">
691
+
692
+ <p>Disconnect from the current server.</p>
693
+
694
+
695
+ </div>
696
+ </div>
697
+ <div class="tags">
698
+
699
+
700
+ <p class="tag_title">See Also:</p>
701
+ <ul class="see">
702
+
703
+ <li><span class='object_link'><a href="Jylis/Connection.html#disconnect-instance_method" title="Jylis::Connection#disconnect (method)">Jylis::Connection#disconnect</a></span></li>
704
+
705
+ </ul>
706
+
707
+ </div><table class="source_code">
708
+ <tr>
709
+ <td>
710
+ <pre class="lines">
711
+
712
+
713
+ 37
714
+ 38
715
+ 39</pre>
716
+ </td>
717
+ <td>
718
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 37</span>
719
+
720
+ <span class='kw'>def</span> <span class='id identifier rubyid_disconnect'>disconnect</span>
721
+ <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_disconnect'>disconnect</span>
722
+ <span class='kw'>end</span></pre>
723
+ </td>
724
+ </tr>
725
+ </table>
726
+ </div>
727
+
728
+ <div class="method_details ">
729
+ <h3 class="signature " id="gcount-class_method">
730
+
731
+ .<strong>gcount</strong> &#x21d2; <tt><span class='object_link'><a href="Jylis/DataType/GCOUNT.html" title="Jylis::DataType::GCOUNT (class)">Jylis::DataType::GCOUNT</a></span></tt>
732
+
733
+
734
+
735
+
736
+
737
+ </h3><div class="docstring">
738
+ <div class="discussion">
739
+
740
+ <p>GCOUNT functions</p>
741
+
742
+
743
+ </div>
744
+ </div>
745
+ <div class="tags">
746
+
747
+ <p class="tag_title">Returns:</p>
748
+ <ul class="return">
749
+
750
+ <li>
751
+
752
+
753
+ <span class='type'>(<tt><span class='object_link'><a href="Jylis/DataType/GCOUNT.html" title="Jylis::DataType::GCOUNT (class)">Jylis::DataType::GCOUNT</a></span></tt>)</span>
754
+
755
+
756
+
757
+ </li>
758
+
759
+ </ul>
760
+
761
+ <p class="tag_title">See Also:</p>
762
+ <ul class="see">
763
+
764
+ <li><span class='object_link'><a href="Jylis/Connection.html#gcount-instance_method" title="Jylis::Connection#gcount (method)">Jylis::Connection#gcount</a></span></li>
765
+
766
+ </ul>
767
+
768
+ </div><table class="source_code">
769
+ <tr>
770
+ <td>
771
+ <pre class="lines">
772
+
773
+
774
+ 78
775
+ 79
776
+ 80</pre>
777
+ </td>
778
+ <td>
779
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 78</span>
780
+
781
+ <span class='kw'>def</span> <span class='id identifier rubyid_gcount'>gcount</span>
782
+ <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_gcount'>gcount</span>
783
+ <span class='kw'>end</span></pre>
784
+ </td>
785
+ </tr>
786
+ </table>
787
+ </div>
788
+
789
+ <div class="method_details ">
790
+ <h3 class="signature " id="mvreg-class_method">
791
+
792
+ .<strong>mvreg</strong> &#x21d2; <tt><span class='object_link'><a href="Jylis/DataType/MVREG.html" title="Jylis::DataType::MVREG (class)">Jylis::DataType::MVREG</a></span></tt>
793
+
794
+
795
+
796
+
797
+
798
+ </h3><div class="docstring">
799
+ <div class="discussion">
800
+
801
+ <p>MVREG functions</p>
802
+
803
+
804
+ </div>
805
+ </div>
806
+ <div class="tags">
807
+
808
+ <p class="tag_title">Returns:</p>
809
+ <ul class="return">
810
+
811
+ <li>
812
+
813
+
814
+ <span class='type'>(<tt><span class='object_link'><a href="Jylis/DataType/MVREG.html" title="Jylis::DataType::MVREG (class)">Jylis::DataType::MVREG</a></span></tt>)</span>
815
+
816
+
817
+
818
+ </li>
819
+
820
+ </ul>
821
+
822
+ <p class="tag_title">See Also:</p>
823
+ <ul class="see">
824
+
825
+ <li><span class='object_link'><a href="Jylis/Connection.html#mvreg-instance_method" title="Jylis::Connection#mvreg (method)">Jylis::Connection#mvreg</a></span></li>
826
+
827
+ </ul>
828
+
829
+ </div><table class="source_code">
830
+ <tr>
831
+ <td>
832
+ <pre class="lines">
833
+
834
+
835
+ 96
836
+ 97
837
+ 98</pre>
838
+ </td>
839
+ <td>
840
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 96</span>
841
+
842
+ <span class='kw'>def</span> <span class='id identifier rubyid_mvreg'>mvreg</span>
843
+ <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_mvreg'>mvreg</span>
844
+ <span class='kw'>end</span></pre>
845
+ </td>
846
+ </tr>
847
+ </table>
848
+ </div>
849
+
850
+ <div class="method_details ">
851
+ <h3 class="signature " id="pncount-class_method">
852
+
853
+ .<strong>pncount</strong> &#x21d2; <tt><span class='object_link'><a href="Jylis/DataType/PNCOUNT.html" title="Jylis::DataType::PNCOUNT (class)">Jylis::DataType::PNCOUNT</a></span></tt>
854
+
855
+
856
+
857
+
858
+
859
+ </h3><div class="docstring">
860
+ <div class="discussion">
861
+
862
+ <p>PNCOUNT functions</p>
863
+
864
+
865
+ </div>
866
+ </div>
867
+ <div class="tags">
868
+
869
+ <p class="tag_title">Returns:</p>
870
+ <ul class="return">
871
+
872
+ <li>
873
+
874
+
875
+ <span class='type'>(<tt><span class='object_link'><a href="Jylis/DataType/PNCOUNT.html" title="Jylis::DataType::PNCOUNT (class)">Jylis::DataType::PNCOUNT</a></span></tt>)</span>
876
+
877
+
878
+
879
+ </li>
880
+
881
+ </ul>
882
+
883
+ <p class="tag_title">See Also:</p>
884
+ <ul class="see">
885
+
886
+ <li><span class='object_link'><a href="Jylis/Connection.html#pncount-instance_method" title="Jylis::Connection#pncount (method)">Jylis::Connection#pncount</a></span></li>
887
+
888
+ </ul>
889
+
890
+ </div><table class="source_code">
891
+ <tr>
892
+ <td>
893
+ <pre class="lines">
894
+
895
+
896
+ 87
897
+ 88
898
+ 89</pre>
899
+ </td>
900
+ <td>
901
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 87</span>
902
+
903
+ <span class='kw'>def</span> <span class='id identifier rubyid_pncount'>pncount</span>
904
+ <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_pncount'>pncount</span>
905
+ <span class='kw'>end</span></pre>
906
+ </td>
907
+ </tr>
908
+ </table>
909
+ </div>
910
+
911
+ <div class="method_details ">
912
+ <h3 class="signature " id="query-class_method">
913
+
914
+ .<strong>query</strong>(*args) &#x21d2; <tt>Array</tt>
915
+
916
+
917
+
918
+
919
+
920
+ </h3><div class="docstring">
921
+ <div class="discussion">
922
+
923
+ <p>Make a query to the database.</p>
924
+
925
+
926
+ </div>
927
+ </div>
928
+ <div class="tags">
929
+ <p class="tag_title">Parameters:</p>
930
+ <ul class="param">
931
+
932
+ <li>
933
+
934
+ <span class='name'>args</span>
935
+
936
+
937
+ <span class='type'></span>
938
+
939
+
940
+
941
+ &mdash;
942
+ <div class='inline'>
943
+ <p>data type function args. Can be an args list or array.</p>
944
+ </div>
945
+
946
+ </li>
947
+
948
+ </ul>
949
+
950
+ <p class="tag_title">Returns:</p>
951
+ <ul class="return">
952
+
953
+ <li>
954
+
955
+
956
+ <span class='type'>(<tt>Array</tt>)</span>
957
+
958
+
959
+
960
+ &mdash;
961
+ <div class='inline'>
962
+ <p>query response</p>
963
+ </div>
964
+
965
+ </li>
966
+
967
+ </ul>
968
+
969
+ <p class="tag_title">See Also:</p>
970
+ <ul class="see">
971
+
972
+ <li><span class='object_link'><a href="Jylis/Connection.html#query-instance_method" title="Jylis::Connection#query (method)">Jylis::Connection#query</a></span></li>
973
+
974
+ <li><a href="https://jemc.github.io/jylis/docs/types/" target="_parent" title="https://jemc.github.io/jylis/docs/types/">https://jemc.github.io/jylis/docs/types/</a></li>
975
+
976
+ </ul>
977
+
978
+ </div><table class="source_code">
979
+ <tr>
980
+ <td>
981
+ <pre class="lines">
982
+
983
+
984
+ 49
985
+ 50
986
+ 51</pre>
987
+ </td>
988
+ <td>
989
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 49</span>
990
+
991
+ <span class='kw'>def</span> <span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
992
+ <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
993
+ <span class='kw'>end</span></pre>
994
+ </td>
995
+ </tr>
996
+ </table>
997
+ </div>
998
+
999
+ <div class="method_details ">
1000
+ <h3 class="signature " id="reconnect-class_method">
1001
+
1002
+ .<strong>reconnect</strong> &#x21d2; <tt>Object</tt>
1003
+
1004
+
1005
+
1006
+
1007
+
1008
+ </h3><div class="docstring">
1009
+ <div class="discussion">
1010
+
1011
+ <p>Reconnect to the current server.</p>
1012
+
1013
+
1014
+ </div>
1015
+ </div>
1016
+ <div class="tags">
1017
+
1018
+
1019
+ <p class="tag_title">See Also:</p>
1020
+ <ul class="see">
1021
+
1022
+ <li><span class='object_link'><a href="Jylis/Connection.html#reconnect-instance_method" title="Jylis::Connection#reconnect (method)">Jylis::Connection#reconnect</a></span></li>
1023
+
1024
+ </ul>
1025
+
1026
+ </div><table class="source_code">
1027
+ <tr>
1028
+ <td>
1029
+ <pre class="lines">
1030
+
1031
+
1032
+ 31
1033
+ 32
1034
+ 33</pre>
1035
+ </td>
1036
+ <td>
1037
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 31</span>
1038
+
1039
+ <span class='kw'>def</span> <span class='id identifier rubyid_reconnect'>reconnect</span>
1040
+ <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_reconnect'>reconnect</span>
1041
+ <span class='kw'>end</span></pre>
1042
+ </td>
1043
+ </tr>
1044
+ </table>
1045
+ </div>
1046
+
1047
+ <div class="method_details ">
1048
+ <h3 class="signature " id="tlog-class_method">
1049
+
1050
+ .<strong>tlog</strong> &#x21d2; <tt><span class='object_link'><a href="Jylis/DataType/TLOG.html" title="Jylis::DataType::TLOG (class)">Jylis::DataType::TLOG</a></span></tt>
1051
+
1052
+
1053
+
1054
+
1055
+
1056
+ </h3><div class="docstring">
1057
+ <div class="discussion">
1058
+
1059
+ <p>TLOG functions</p>
1060
+
1061
+
1062
+ </div>
1063
+ </div>
1064
+ <div class="tags">
1065
+
1066
+ <p class="tag_title">Returns:</p>
1067
+ <ul class="return">
1068
+
1069
+ <li>
1070
+
1071
+
1072
+ <span class='type'>(<tt><span class='object_link'><a href="Jylis/DataType/TLOG.html" title="Jylis::DataType::TLOG (class)">Jylis::DataType::TLOG</a></span></tt>)</span>
1073
+
1074
+
1075
+
1076
+ </li>
1077
+
1078
+ </ul>
1079
+
1080
+ <p class="tag_title">See Also:</p>
1081
+ <ul class="see">
1082
+
1083
+ <li><span class='object_link'><a href="Jylis/Connection.html#tlog-instance_method" title="Jylis::Connection#tlog (method)">Jylis::Connection#tlog</a></span></li>
1084
+
1085
+ </ul>
1086
+
1087
+ </div><table class="source_code">
1088
+ <tr>
1089
+ <td>
1090
+ <pre class="lines">
1091
+
1092
+
1093
+ 69
1094
+ 70
1095
+ 71</pre>
1096
+ </td>
1097
+ <td>
1098
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 69</span>
1099
+
1100
+ <span class='kw'>def</span> <span class='id identifier rubyid_tlog'>tlog</span>
1101
+ <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_tlog'>tlog</span>
1102
+ <span class='kw'>end</span></pre>
1103
+ </td>
1104
+ </tr>
1105
+ </table>
1106
+ </div>
1107
+
1108
+ <div class="method_details ">
1109
+ <h3 class="signature " id="treg-class_method">
1110
+
1111
+ .<strong>treg</strong> &#x21d2; <tt><span class='object_link'><a href="Jylis/DataType/TREG.html" title="Jylis::DataType::TREG (class)">Jylis::DataType::TREG</a></span></tt>
1112
+
1113
+
1114
+
1115
+
1116
+
1117
+ </h3><div class="docstring">
1118
+ <div class="discussion">
1119
+
1120
+ <p>TREG functions</p>
1121
+
1122
+
1123
+ </div>
1124
+ </div>
1125
+ <div class="tags">
1126
+
1127
+ <p class="tag_title">Returns:</p>
1128
+ <ul class="return">
1129
+
1130
+ <li>
1131
+
1132
+
1133
+ <span class='type'>(<tt><span class='object_link'><a href="Jylis/DataType/TREG.html" title="Jylis::DataType::TREG (class)">Jylis::DataType::TREG</a></span></tt>)</span>
1134
+
1135
+
1136
+
1137
+ </li>
1138
+
1139
+ </ul>
1140
+
1141
+ <p class="tag_title">See Also:</p>
1142
+ <ul class="see">
1143
+
1144
+ <li><span class='object_link'><a href="Jylis/Connection.html#treg-instance_method" title="Jylis::Connection#treg (method)">Jylis::Connection#treg</a></span></li>
1145
+
1146
+ </ul>
1147
+
1148
+ </div><table class="source_code">
1149
+ <tr>
1150
+ <td>
1151
+ <pre class="lines">
1152
+
1153
+
1154
+ 60
1155
+ 61
1156
+ 62</pre>
1157
+ </td>
1158
+ <td>
1159
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 60</span>
1160
+
1161
+ <span class='kw'>def</span> <span class='id identifier rubyid_treg'>treg</span>
1162
+ <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_treg'>treg</span>
1163
+ <span class='kw'>end</span></pre>
1164
+ </td>
1165
+ </tr>
1166
+ </table>
1167
+ </div>
1168
+
1169
+ <div class="method_details ">
1170
+ <h3 class="signature " id="ujson-class_method">
1171
+
1172
+ .<strong>ujson</strong> &#x21d2; <tt><span class='object_link'><a href="Jylis/DataType/UJSON.html" title="Jylis::DataType::UJSON (class)">Jylis::DataType::UJSON</a></span></tt>
1173
+
1174
+
1175
+
1176
+
1177
+
1178
+ </h3><div class="docstring">
1179
+ <div class="discussion">
1180
+
1181
+ <p>UJSON functions</p>
1182
+
1183
+
1184
+ </div>
1185
+ </div>
1186
+ <div class="tags">
1187
+
1188
+ <p class="tag_title">Returns:</p>
1189
+ <ul class="return">
1190
+
1191
+ <li>
1192
+
1193
+
1194
+ <span class='type'>(<tt><span class='object_link'><a href="Jylis/DataType/UJSON.html" title="Jylis::DataType::UJSON (class)">Jylis::DataType::UJSON</a></span></tt>)</span>
1195
+
1196
+
1197
+
1198
+ </li>
1199
+
1200
+ </ul>
1201
+
1202
+ <p class="tag_title">See Also:</p>
1203
+ <ul class="see">
1204
+
1205
+ <li><span class='object_link'><a href="Jylis/Connection.html#ujson-instance_method" title="Jylis::Connection#ujson (method)">Jylis::Connection#ujson</a></span></li>
1206
+
1207
+ </ul>
1208
+
1209
+ </div><table class="source_code">
1210
+ <tr>
1211
+ <td>
1212
+ <pre class="lines">
1213
+
1214
+
1215
+ 105
1216
+ 106
1217
+ 107</pre>
1218
+ </td>
1219
+ <td>
1220
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 105</span>
1221
+
1222
+ <span class='kw'>def</span> <span class='id identifier rubyid_ujson'>ujson</span>
1223
+ <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_ujson'>ujson</span>
1224
+ <span class='kw'>end</span></pre>
1225
+ </td>
1226
+ </tr>
1227
+ </table>
1228
+ </div>
1229
+
1230
+ </div>
150
1231
 
151
1232
  </div>
152
1233
 
153
1234
  <div id="footer">
154
- Generated on Sat Jun 2 13:02:48 2018 by
1235
+ Generated on Sun Jun 3 21:46:59 2018 by
155
1236
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
156
- 0.9.13 (ruby-2.5.1).
1237
+ 0.9.14 (ruby-2.5.1).
157
1238
  </div>
158
1239
 
159
1240
  </div>