jylis-rb 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +25 -4
- data/doc/Jylis.html +43 -39
- data/doc/Jylis/Connection.html +1 -1
- data/doc/Jylis/Connection/HostMissingError.html +1 -1
- data/doc/Jylis/Connection/UnsupportedSchemaError.html +1 -1
- data/doc/Jylis/DataType.html +1 -1
- data/doc/Jylis/DataType/Base.html +1 -1
- data/doc/Jylis/DataType/GCOUNT.html +1 -1
- data/doc/Jylis/DataType/MVREG.html +1 -1
- data/doc/Jylis/DataType/PNCOUNT.html +1 -1
- data/doc/Jylis/DataType/TLOG.html +97 -53
- data/doc/Jylis/DataType/TLOG/Result.html +1 -1
- data/doc/Jylis/DataType/TLOG/Row.html +167 -1
- data/doc/Jylis/DataType/TREG.html +38 -16
- data/doc/Jylis/DataType/TREG/Result.html +167 -1
- data/doc/Jylis/DataType/UJSON.html +1 -1
- data/doc/Jylis/Helpers.html +115 -0
- data/doc/Jylis/Helpers/Timestamp.html +288 -0
- data/doc/_index.html +1 -1
- data/doc/file.README.html +26 -5
- data/doc/file.license.html +1 -1
- data/doc/index.html +26 -5
- data/doc/method_list.html +32 -0
- data/doc/top-level-namespace.html +1 -1
- data/lib/jylis-rb/data_types/tlog.rb +18 -2
- data/lib/jylis-rb/data_types/treg.rb +14 -1
- data/lib/jylis-rb/jylis.rb +2 -0
- data/lib/jylis-rb/version.rb +1 -1
- metadata +4 -2
@@ -630,7 +630,7 @@
|
|
630
630
|
</div>
|
631
631
|
|
632
632
|
<div id="footer">
|
633
|
-
Generated on
|
633
|
+
Generated on Tue Jun 5 17:01:51 2018 by
|
634
634
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
635
635
|
0.9.14 (ruby-2.5.1).
|
636
636
|
</div>
|
@@ -268,6 +268,54 @@
|
|
268
268
|
<p>A new instance of Row.</p>
|
269
269
|
</div></span>
|
270
270
|
|
271
|
+
</li>
|
272
|
+
|
273
|
+
|
274
|
+
<li class="public ">
|
275
|
+
<span class="summary_signature">
|
276
|
+
|
277
|
+
<a href="#time-instance_method" title="#time (instance method)">#<strong>time</strong> ⇒ Time </a>
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
</span>
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
<span class="summary_desc"><div class='inline'>
|
292
|
+
<p>The timestamp as a Time object.</p>
|
293
|
+
</div></span>
|
294
|
+
|
295
|
+
</li>
|
296
|
+
|
297
|
+
|
298
|
+
<li class="public ">
|
299
|
+
<span class="summary_signature">
|
300
|
+
|
301
|
+
<a href="#timestamp_iso8601-instance_method" title="#timestamp_iso8601 (instance method)">#<strong>timestamp_iso8601</strong> ⇒ String </a>
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
</span>
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
<span class="summary_desc"><div class='inline'>
|
316
|
+
<p>The timestamp as an ISO8601 formatted string.</p>
|
317
|
+
</div></span>
|
318
|
+
|
271
319
|
</li>
|
272
320
|
|
273
321
|
|
@@ -558,6 +606,124 @@
|
|
558
606
|
</td>
|
559
607
|
</tr>
|
560
608
|
</table>
|
609
|
+
</div>
|
610
|
+
|
611
|
+
<div class="method_details ">
|
612
|
+
<h3 class="signature " id="time-instance_method">
|
613
|
+
|
614
|
+
#<strong>time</strong> ⇒ <tt>Time</tt>
|
615
|
+
|
616
|
+
|
617
|
+
|
618
|
+
|
619
|
+
|
620
|
+
</h3><div class="docstring">
|
621
|
+
<div class="discussion">
|
622
|
+
|
623
|
+
<p>Returns the timestamp as a Time object</p>
|
624
|
+
|
625
|
+
|
626
|
+
</div>
|
627
|
+
</div>
|
628
|
+
<div class="tags">
|
629
|
+
|
630
|
+
<p class="tag_title">Returns:</p>
|
631
|
+
<ul class="return">
|
632
|
+
|
633
|
+
<li>
|
634
|
+
|
635
|
+
|
636
|
+
<span class='type'>(<tt>Time</tt>)</span>
|
637
|
+
|
638
|
+
|
639
|
+
|
640
|
+
—
|
641
|
+
<div class='inline'>
|
642
|
+
<p>the timestamp as a Time object</p>
|
643
|
+
</div>
|
644
|
+
|
645
|
+
</li>
|
646
|
+
|
647
|
+
</ul>
|
648
|
+
|
649
|
+
</div><table class="source_code">
|
650
|
+
<tr>
|
651
|
+
<td>
|
652
|
+
<pre class="lines">
|
653
|
+
|
654
|
+
|
655
|
+
81
|
656
|
+
82
|
657
|
+
83</pre>
|
658
|
+
</td>
|
659
|
+
<td>
|
660
|
+
<pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/tlog.rb', line 81</span>
|
661
|
+
|
662
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_time'>time</span>
|
663
|
+
<span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_at'>at</span><span class='lparen'>(</span><span class='id identifier rubyid_timestamp'>timestamp</span><span class='rparen'>)</span>
|
664
|
+
<span class='kw'>end</span></pre>
|
665
|
+
</td>
|
666
|
+
</tr>
|
667
|
+
</table>
|
668
|
+
</div>
|
669
|
+
|
670
|
+
<div class="method_details ">
|
671
|
+
<h3 class="signature " id="timestamp_iso8601-instance_method">
|
672
|
+
|
673
|
+
#<strong>timestamp_iso8601</strong> ⇒ <tt>String</tt>
|
674
|
+
|
675
|
+
|
676
|
+
|
677
|
+
|
678
|
+
|
679
|
+
</h3><div class="docstring">
|
680
|
+
<div class="discussion">
|
681
|
+
|
682
|
+
<p>Returns the timestamp as an ISO8601 formatted string</p>
|
683
|
+
|
684
|
+
|
685
|
+
</div>
|
686
|
+
</div>
|
687
|
+
<div class="tags">
|
688
|
+
|
689
|
+
<p class="tag_title">Returns:</p>
|
690
|
+
<ul class="return">
|
691
|
+
|
692
|
+
<li>
|
693
|
+
|
694
|
+
|
695
|
+
<span class='type'>(<tt>String</tt>)</span>
|
696
|
+
|
697
|
+
|
698
|
+
|
699
|
+
—
|
700
|
+
<div class='inline'>
|
701
|
+
<p>the timestamp as an ISO8601 formatted string</p>
|
702
|
+
</div>
|
703
|
+
|
704
|
+
</li>
|
705
|
+
|
706
|
+
</ul>
|
707
|
+
|
708
|
+
</div><table class="source_code">
|
709
|
+
<tr>
|
710
|
+
<td>
|
711
|
+
<pre class="lines">
|
712
|
+
|
713
|
+
|
714
|
+
86
|
715
|
+
87
|
716
|
+
88</pre>
|
717
|
+
</td>
|
718
|
+
<td>
|
719
|
+
<pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/tlog.rb', line 86</span>
|
720
|
+
|
721
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_timestamp_iso8601'>timestamp_iso8601</span>
|
722
|
+
<span class='id identifier rubyid_time'>time</span><span class='period'>.</span><span class='id identifier rubyid_utc'>utc</span><span class='period'>.</span><span class='id identifier rubyid_iso8601'>iso8601</span>
|
723
|
+
<span class='kw'>end</span></pre>
|
724
|
+
</td>
|
725
|
+
</tr>
|
726
|
+
</table>
|
561
727
|
</div>
|
562
728
|
|
563
729
|
<div class="method_details ">
|
@@ -606,7 +772,7 @@
|
|
606
772
|
</div>
|
607
773
|
|
608
774
|
<div id="footer">
|
609
|
-
Generated on
|
775
|
+
Generated on Tue Jun 5 17:01:51 2018 by
|
610
776
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
611
777
|
0.9.14 (ruby-2.5.1).
|
612
778
|
</div>
|
@@ -262,14 +262,14 @@
|
|
262
262
|
<pre class="lines">
|
263
263
|
|
264
264
|
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
265
|
+
51
|
266
|
+
52
|
267
|
+
53
|
268
|
+
54
|
269
|
+
55</pre>
|
270
270
|
</td>
|
271
271
|
<td>
|
272
|
-
<pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/treg.rb', line
|
272
|
+
<pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/treg.rb', line 51</span>
|
273
273
|
|
274
274
|
<span class='kw'>def</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
275
275
|
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_connection'>connection</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>TREG</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>GET</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
@@ -299,7 +299,27 @@
|
|
299
299
|
</div>
|
300
300
|
</div>
|
301
301
|
<div class="tags">
|
302
|
+
<p class="tag_title">Parameters:</p>
|
303
|
+
<ul class="param">
|
302
304
|
|
305
|
+
<li>
|
306
|
+
|
307
|
+
<span class='name'>timestamp</span>
|
308
|
+
|
309
|
+
|
310
|
+
<span class='type'>(<tt>Integer</tt>, <tt>String</tt>)</span>
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
—
|
315
|
+
<div class='inline'>
|
316
|
+
<p>a unix or iso8601 formatted timestamp</p>
|
317
|
+
</div>
|
318
|
+
|
319
|
+
</li>
|
320
|
+
|
321
|
+
</ul>
|
322
|
+
|
303
323
|
|
304
324
|
</div><table class="source_code">
|
305
325
|
<tr>
|
@@ -307,19 +327,21 @@
|
|
307
327
|
<pre class="lines">
|
308
328
|
|
309
329
|
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
330
|
+
60
|
331
|
+
61
|
332
|
+
62
|
333
|
+
63
|
334
|
+
64
|
335
|
+
65
|
336
|
+
66
|
337
|
+
67</pre>
|
317
338
|
</td>
|
318
339
|
<td>
|
319
|
-
<pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/treg.rb', line
|
340
|
+
<pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/treg.rb', line 60</span>
|
320
341
|
|
321
342
|
<span class='kw'>def</span> <span class='id identifier rubyid_set'>set</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_timestamp'>timestamp</span><span class='rparen'>)</span>
|
322
|
-
<span class='id identifier
|
343
|
+
<span class='id identifier rubyid_timestamp'>timestamp</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_timestamp'>timestamp</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_utc'>utc</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='kw'>if</span> <span class='id identifier rubyid_timestamp'>timestamp</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span>
|
344
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_connection'>connection</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>TREG</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>SET</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_timestamp'>timestamp</span><span class='rparen'>)</span>
|
323
345
|
|
324
346
|
<span class='kw'>unless</span> <span class='id identifier rubyid_result'>result</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>OK</span><span class='tstring_end'>"</span></span>
|
325
347
|
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Failed: TREG SET </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_value'>value</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_timestamp'>timestamp</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
@@ -335,7 +357,7 @@
|
|
335
357
|
</div>
|
336
358
|
|
337
359
|
<div id="footer">
|
338
|
-
Generated on
|
360
|
+
Generated on Tue Jun 5 17:01:51 2018 by
|
339
361
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
340
362
|
0.9.14 (ruby-2.5.1).
|
341
363
|
</div>
|
@@ -268,6 +268,54 @@
|
|
268
268
|
<p>A new instance of Result.</p>
|
269
269
|
</div></span>
|
270
270
|
|
271
|
+
</li>
|
272
|
+
|
273
|
+
|
274
|
+
<li class="public ">
|
275
|
+
<span class="summary_signature">
|
276
|
+
|
277
|
+
<a href="#time-instance_method" title="#time (instance method)">#<strong>time</strong> ⇒ Time </a>
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
</span>
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
<span class="summary_desc"><div class='inline'>
|
292
|
+
<p>The timestamp as a Time object.</p>
|
293
|
+
</div></span>
|
294
|
+
|
295
|
+
</li>
|
296
|
+
|
297
|
+
|
298
|
+
<li class="public ">
|
299
|
+
<span class="summary_signature">
|
300
|
+
|
301
|
+
<a href="#timestamp_iso8601-instance_method" title="#timestamp_iso8601 (instance method)">#<strong>timestamp_iso8601</strong> ⇒ String </a>
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
</span>
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
<span class="summary_desc"><div class='inline'>
|
316
|
+
<p>The timestamp as an ISO8601 formatted string.</p>
|
317
|
+
</div></span>
|
318
|
+
|
271
319
|
</li>
|
272
320
|
|
273
321
|
|
@@ -558,6 +606,124 @@
|
|
558
606
|
</td>
|
559
607
|
</tr>
|
560
608
|
</table>
|
609
|
+
</div>
|
610
|
+
|
611
|
+
<div class="method_details ">
|
612
|
+
<h3 class="signature " id="time-instance_method">
|
613
|
+
|
614
|
+
#<strong>time</strong> ⇒ <tt>Time</tt>
|
615
|
+
|
616
|
+
|
617
|
+
|
618
|
+
|
619
|
+
|
620
|
+
</h3><div class="docstring">
|
621
|
+
<div class="discussion">
|
622
|
+
|
623
|
+
<p>Returns the timestamp as a Time object</p>
|
624
|
+
|
625
|
+
|
626
|
+
</div>
|
627
|
+
</div>
|
628
|
+
<div class="tags">
|
629
|
+
|
630
|
+
<p class="tag_title">Returns:</p>
|
631
|
+
<ul class="return">
|
632
|
+
|
633
|
+
<li>
|
634
|
+
|
635
|
+
|
636
|
+
<span class='type'>(<tt>Time</tt>)</span>
|
637
|
+
|
638
|
+
|
639
|
+
|
640
|
+
—
|
641
|
+
<div class='inline'>
|
642
|
+
<p>the timestamp as a Time object</p>
|
643
|
+
</div>
|
644
|
+
|
645
|
+
</li>
|
646
|
+
|
647
|
+
</ul>
|
648
|
+
|
649
|
+
</div><table class="source_code">
|
650
|
+
<tr>
|
651
|
+
<td>
|
652
|
+
<pre class="lines">
|
653
|
+
|
654
|
+
|
655
|
+
38
|
656
|
+
39
|
657
|
+
40</pre>
|
658
|
+
</td>
|
659
|
+
<td>
|
660
|
+
<pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/treg.rb', line 38</span>
|
661
|
+
|
662
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_time'>time</span>
|
663
|
+
<span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_at'>at</span><span class='lparen'>(</span><span class='id identifier rubyid_timestamp'>timestamp</span><span class='rparen'>)</span>
|
664
|
+
<span class='kw'>end</span></pre>
|
665
|
+
</td>
|
666
|
+
</tr>
|
667
|
+
</table>
|
668
|
+
</div>
|
669
|
+
|
670
|
+
<div class="method_details ">
|
671
|
+
<h3 class="signature " id="timestamp_iso8601-instance_method">
|
672
|
+
|
673
|
+
#<strong>timestamp_iso8601</strong> ⇒ <tt>String</tt>
|
674
|
+
|
675
|
+
|
676
|
+
|
677
|
+
|
678
|
+
|
679
|
+
</h3><div class="docstring">
|
680
|
+
<div class="discussion">
|
681
|
+
|
682
|
+
<p>Returns the timestamp as an ISO8601 formatted string</p>
|
683
|
+
|
684
|
+
|
685
|
+
</div>
|
686
|
+
</div>
|
687
|
+
<div class="tags">
|
688
|
+
|
689
|
+
<p class="tag_title">Returns:</p>
|
690
|
+
<ul class="return">
|
691
|
+
|
692
|
+
<li>
|
693
|
+
|
694
|
+
|
695
|
+
<span class='type'>(<tt>String</tt>)</span>
|
696
|
+
|
697
|
+
|
698
|
+
|
699
|
+
—
|
700
|
+
<div class='inline'>
|
701
|
+
<p>the timestamp as an ISO8601 formatted string</p>
|
702
|
+
</div>
|
703
|
+
|
704
|
+
</li>
|
705
|
+
|
706
|
+
</ul>
|
707
|
+
|
708
|
+
</div><table class="source_code">
|
709
|
+
<tr>
|
710
|
+
<td>
|
711
|
+
<pre class="lines">
|
712
|
+
|
713
|
+
|
714
|
+
43
|
715
|
+
44
|
716
|
+
45</pre>
|
717
|
+
</td>
|
718
|
+
<td>
|
719
|
+
<pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/treg.rb', line 43</span>
|
720
|
+
|
721
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_timestamp_iso8601'>timestamp_iso8601</span>
|
722
|
+
<span class='id identifier rubyid_time'>time</span><span class='period'>.</span><span class='id identifier rubyid_utc'>utc</span><span class='period'>.</span><span class='id identifier rubyid_iso8601'>iso8601</span>
|
723
|
+
<span class='kw'>end</span></pre>
|
724
|
+
</td>
|
725
|
+
</tr>
|
726
|
+
</table>
|
561
727
|
</div>
|
562
728
|
|
563
729
|
<div class="method_details ">
|
@@ -606,7 +772,7 @@
|
|
606
772
|
</div>
|
607
773
|
|
608
774
|
<div id="footer">
|
609
|
-
Generated on
|
775
|
+
Generated on Tue Jun 5 17:01:51 2018 by
|
610
776
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
611
777
|
0.9.14 (ruby-2.5.1).
|
612
778
|
</div>
|