timescaledb 0.2.6 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/bin/tsdb +30 -29
  3. data/lib/timescaledb/acts_as_hypertable/core.rb +1 -1
  4. data/lib/timescaledb/acts_as_hypertable.rb +5 -2
  5. data/lib/timescaledb/connection.rb +43 -0
  6. data/lib/timescaledb/connection_handling.rb +16 -0
  7. data/lib/timescaledb/database/chunk_statements.rb +21 -0
  8. data/lib/timescaledb/database/hypertable_statements.rb +37 -0
  9. data/lib/timescaledb/database/quoting.rb +12 -0
  10. data/lib/timescaledb/database/schema_statements.rb +246 -0
  11. data/lib/timescaledb/database/types.rb +20 -0
  12. data/lib/timescaledb/database.rb +15 -0
  13. data/lib/timescaledb/migration_helpers.rb +36 -8
  14. data/lib/timescaledb/schema_dumper.rb +40 -12
  15. data/lib/timescaledb/stats/chunks.rb +41 -0
  16. data/lib/timescaledb/stats/continuous_aggregates.rb +24 -0
  17. data/lib/timescaledb/stats/hypertables.rb +102 -0
  18. data/lib/timescaledb/stats/job_stats.rb +29 -0
  19. data/lib/timescaledb/stats.rb +22 -0
  20. data/lib/timescaledb/toolkit/time_vector.rb +21 -17
  21. data/lib/timescaledb/version.rb +1 -1
  22. data/lib/timescaledb.rb +3 -0
  23. metadata +15 -95
  24. data/.github/workflows/ci.yml +0 -72
  25. data/.gitignore +0 -12
  26. data/.rspec +0 -3
  27. data/.ruby-version +0 -1
  28. data/.tool-versions +0 -1
  29. data/.travis.yml +0 -9
  30. data/CODE_OF_CONDUCT.md +0 -74
  31. data/Fastfile +0 -17
  32. data/Gemfile +0 -8
  33. data/Gemfile.lock +0 -75
  34. data/Gemfile.scenic +0 -7
  35. data/Gemfile.scenic.lock +0 -119
  36. data/README.md +0 -490
  37. data/Rakefile +0 -21
  38. data/bin/console +0 -28
  39. data/bin/setup +0 -13
  40. data/docs/command_line.md +0 -178
  41. data/docs/img/lttb_example.png +0 -0
  42. data/docs/img/lttb_sql_vs_ruby.gif +0 -0
  43. data/docs/img/lttb_zoom.gif +0 -0
  44. data/docs/index.md +0 -72
  45. data/docs/migrations.md +0 -76
  46. data/docs/models.md +0 -78
  47. data/docs/toolkit.md +0 -507
  48. data/docs/toolkit_lttb_tutorial.md +0 -557
  49. data/docs/toolkit_lttb_zoom.md +0 -357
  50. data/docs/toolkit_ohlc.md +0 -315
  51. data/docs/videos.md +0 -16
  52. data/examples/all_in_one/all_in_one.rb +0 -94
  53. data/examples/all_in_one/benchmark_comparison.rb +0 -108
  54. data/examples/all_in_one/caggs.rb +0 -93
  55. data/examples/all_in_one/query_data.rb +0 -78
  56. data/examples/ranking/.gitattributes +0 -7
  57. data/examples/ranking/.gitignore +0 -29
  58. data/examples/ranking/.ruby-version +0 -1
  59. data/examples/ranking/Gemfile +0 -33
  60. data/examples/ranking/Gemfile.lock +0 -189
  61. data/examples/ranking/README.md +0 -166
  62. data/examples/ranking/Rakefile +0 -6
  63. data/examples/ranking/app/controllers/application_controller.rb +0 -2
  64. data/examples/ranking/app/controllers/concerns/.keep +0 -0
  65. data/examples/ranking/app/jobs/application_job.rb +0 -7
  66. data/examples/ranking/app/models/application_record.rb +0 -3
  67. data/examples/ranking/app/models/concerns/.keep +0 -0
  68. data/examples/ranking/app/models/game.rb +0 -2
  69. data/examples/ranking/app/models/play.rb +0 -7
  70. data/examples/ranking/bin/bundle +0 -114
  71. data/examples/ranking/bin/rails +0 -4
  72. data/examples/ranking/bin/rake +0 -4
  73. data/examples/ranking/bin/setup +0 -33
  74. data/examples/ranking/config/application.rb +0 -39
  75. data/examples/ranking/config/boot.rb +0 -4
  76. data/examples/ranking/config/credentials.yml.enc +0 -1
  77. data/examples/ranking/config/database.yml +0 -86
  78. data/examples/ranking/config/environment.rb +0 -5
  79. data/examples/ranking/config/environments/development.rb +0 -60
  80. data/examples/ranking/config/environments/production.rb +0 -75
  81. data/examples/ranking/config/environments/test.rb +0 -53
  82. data/examples/ranking/config/initializers/cors.rb +0 -16
  83. data/examples/ranking/config/initializers/filter_parameter_logging.rb +0 -8
  84. data/examples/ranking/config/initializers/inflections.rb +0 -16
  85. data/examples/ranking/config/initializers/timescale.rb +0 -2
  86. data/examples/ranking/config/locales/en.yml +0 -33
  87. data/examples/ranking/config/puma.rb +0 -43
  88. data/examples/ranking/config/routes.rb +0 -6
  89. data/examples/ranking/config/storage.yml +0 -34
  90. data/examples/ranking/config.ru +0 -6
  91. data/examples/ranking/db/migrate/20220209120747_create_games.rb +0 -10
  92. data/examples/ranking/db/migrate/20220209120910_create_plays.rb +0 -19
  93. data/examples/ranking/db/migrate/20220209143347_create_score_per_hours.rb +0 -5
  94. data/examples/ranking/db/schema.rb +0 -47
  95. data/examples/ranking/db/seeds.rb +0 -7
  96. data/examples/ranking/db/views/score_per_hours_v01.sql +0 -7
  97. data/examples/ranking/lib/tasks/.keep +0 -0
  98. data/examples/ranking/log/.keep +0 -0
  99. data/examples/ranking/public/robots.txt +0 -1
  100. data/examples/ranking/storage/.keep +0 -0
  101. data/examples/ranking/tmp/.keep +0 -0
  102. data/examples/ranking/tmp/pids/.keep +0 -0
  103. data/examples/ranking/tmp/storage/.keep +0 -0
  104. data/examples/ranking/vendor/.keep +0 -0
  105. data/examples/toolkit-demo/compare_volatility.rb +0 -104
  106. data/examples/toolkit-demo/lttb/README.md +0 -15
  107. data/examples/toolkit-demo/lttb/lttb.rb +0 -92
  108. data/examples/toolkit-demo/lttb/lttb_sinatra.rb +0 -139
  109. data/examples/toolkit-demo/lttb/lttb_test.rb +0 -21
  110. data/examples/toolkit-demo/lttb/views/index.erb +0 -27
  111. data/examples/toolkit-demo/lttb-zoom/README.md +0 -13
  112. data/examples/toolkit-demo/lttb-zoom/lttb_zoomable.rb +0 -90
  113. data/examples/toolkit-demo/lttb-zoom/views/index.erb +0 -33
  114. data/examples/toolkit-demo/ohlc.rb +0 -175
  115. data/mkdocs.yml +0 -34
  116. data/timescaledb.gemspec +0 -40
data/CODE_OF_CONDUCT.md DELETED
@@ -1,74 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at jonatasdp@gmail.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [https://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: https://contributor-covenant.org
74
- [version]: https://contributor-covenant.org/version/1/4/
data/Fastfile DELETED
@@ -1,17 +0,0 @@
1
-
2
- # Use `fast .version_up` to rewrite the version file
3
- Fast.shortcut :version_up do
4
- rewrite_file('(casgn nil VERSION (str _)', 'lib/timescaledb/version.rb') do |node|
5
- target = node.children.last.loc.expression
6
- pieces = target.source.split('.').map(&:to_i)
7
- pieces.reverse.each_with_index do |fragment, i|
8
- if fragment < 9
9
- pieces[-(i + 1)] = fragment + 1
10
- break
11
- else
12
- pieces[-(i + 1)] = 0
13
- end
14
- end
15
- replace(target, "'#{pieces.join('.')}'")
16
- end
17
- end
data/Gemfile DELETED
@@ -1,8 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- # Specify your gem's dependencies in timescale.gemspec
4
- gemspec
5
-
6
- # gemika must be listed in the Gemfile rather than as a development dependency in the gemspec.
7
- # It throws an error, otherwise.
8
- gem "gemika"
data/Gemfile.lock DELETED
@@ -1,75 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- timescaledb (0.2.6)
5
- activerecord
6
- activesupport
7
- pg (~> 1.2)
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- activemodel (6.1.4.1)
13
- activesupport (= 6.1.4.1)
14
- activerecord (6.1.4.1)
15
- activemodel (= 6.1.4.1)
16
- activesupport (= 6.1.4.1)
17
- activesupport (6.1.4.1)
18
- concurrent-ruby (~> 1.0, >= 1.0.2)
19
- i18n (>= 1.6, < 2)
20
- minitest (>= 5.1)
21
- tzinfo (~> 2.0)
22
- zeitwerk (~> 2.3)
23
- coderay (1.1.3)
24
- concurrent-ruby (1.1.9)
25
- database_cleaner-active_record (2.0.1)
26
- activerecord (>= 5.a)
27
- database_cleaner-core (~> 2.0.0)
28
- database_cleaner-core (2.0.1)
29
- diff-lcs (1.4.4)
30
- dotenv (2.7.6)
31
- gemika (0.6.1)
32
- i18n (1.8.10)
33
- concurrent-ruby (~> 1.0)
34
- method_source (1.0.0)
35
- minitest (5.14.4)
36
- pg (1.4.5)
37
- pry (0.14.1)
38
- coderay (~> 1.1)
39
- method_source (~> 1.0)
40
- rake (12.3.3)
41
- rspec (3.10.0)
42
- rspec-core (~> 3.10.0)
43
- rspec-expectations (~> 3.10.0)
44
- rspec-mocks (~> 3.10.0)
45
- rspec-core (3.10.1)
46
- rspec-support (~> 3.10.0)
47
- rspec-expectations (3.10.1)
48
- diff-lcs (>= 1.2.0, < 2.0)
49
- rspec-support (~> 3.10.0)
50
- rspec-its (1.3.0)
51
- rspec-core (>= 3.0.0)
52
- rspec-expectations (>= 3.0.0)
53
- rspec-mocks (3.10.2)
54
- diff-lcs (>= 1.2.0, < 2.0)
55
- rspec-support (~> 3.10.0)
56
- rspec-support (3.10.2)
57
- tzinfo (2.0.4)
58
- concurrent-ruby (~> 1.0)
59
- zeitwerk (2.4.2)
60
-
61
- PLATFORMS
62
- ruby
63
-
64
- DEPENDENCIES
65
- database_cleaner-active_record
66
- dotenv
67
- gemika
68
- pry
69
- rake (~> 12.0)
70
- rspec (~> 3.0)
71
- rspec-its
72
- timescaledb!
73
-
74
- BUNDLED WITH
75
- 2.2.31
data/Gemfile.scenic DELETED
@@ -1,7 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- # Specify your gem's dependencies in timescale.gemspec
4
- gemspec
5
-
6
- gem "scenic"
7
- gem "gemika"
data/Gemfile.scenic.lock DELETED
@@ -1,119 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- timescaledb (0.2.6)
5
- activerecord
6
- activesupport
7
- pg (~> 1.2)
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- actionpack (6.1.4.1)
13
- actionview (= 6.1.4.1)
14
- activesupport (= 6.1.4.1)
15
- rack (~> 2.0, >= 2.0.9)
16
- rack-test (>= 0.6.3)
17
- rails-dom-testing (~> 2.0)
18
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
19
- actionview (6.1.4.1)
20
- activesupport (= 6.1.4.1)
21
- builder (~> 3.1)
22
- erubi (~> 1.4)
23
- rails-dom-testing (~> 2.0)
24
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
25
- activemodel (6.1.4.1)
26
- activesupport (= 6.1.4.1)
27
- activerecord (6.1.4.1)
28
- activemodel (= 6.1.4.1)
29
- activesupport (= 6.1.4.1)
30
- activesupport (6.1.4.1)
31
- concurrent-ruby (~> 1.0, >= 1.0.2)
32
- i18n (>= 1.6, < 2)
33
- minitest (>= 5.1)
34
- tzinfo (~> 2.0)
35
- zeitwerk (~> 2.3)
36
- builder (3.2.4)
37
- coderay (1.1.3)
38
- concurrent-ruby (1.1.9)
39
- crass (1.0.6)
40
- database_cleaner-active_record (2.0.1)
41
- activerecord (>= 5.a)
42
- database_cleaner-core (~> 2.0.0)
43
- database_cleaner-core (2.0.1)
44
- diff-lcs (1.4.4)
45
- dotenv (2.7.6)
46
- erubi (1.10.0)
47
- gemika (0.6.1)
48
- i18n (1.8.11)
49
- concurrent-ruby (~> 1.0)
50
- loofah (2.12.0)
51
- crass (~> 1.0.2)
52
- nokogiri (>= 1.5.9)
53
- method_source (1.0.0)
54
- mini_portile2 (2.6.1)
55
- minitest (5.14.4)
56
- nokogiri (1.12.5)
57
- mini_portile2 (~> 2.6.1)
58
- racc (~> 1.4)
59
- pg (1.4.5)
60
- pry (0.14.1)
61
- coderay (~> 1.1)
62
- method_source (~> 1.0)
63
- racc (1.6.0)
64
- rack (2.2.3)
65
- rack-test (1.1.0)
66
- rack (>= 1.0, < 3)
67
- rails-dom-testing (2.0.3)
68
- activesupport (>= 4.2.0)
69
- nokogiri (>= 1.6)
70
- rails-html-sanitizer (1.4.2)
71
- loofah (~> 2.3)
72
- railties (6.1.4.1)
73
- actionpack (= 6.1.4.1)
74
- activesupport (= 6.1.4.1)
75
- method_source
76
- rake (>= 0.13)
77
- thor (~> 1.0)
78
- rake (12.3.3)
79
- rspec (3.10.0)
80
- rspec-core (~> 3.10.0)
81
- rspec-expectations (~> 3.10.0)
82
- rspec-mocks (~> 3.10.0)
83
- rspec-core (3.10.1)
84
- rspec-support (~> 3.10.0)
85
- rspec-expectations (3.10.1)
86
- diff-lcs (>= 1.2.0, < 2.0)
87
- rspec-support (~> 3.10.0)
88
- rspec-its (1.3.0)
89
- rspec-core (>= 3.0.0)
90
- rspec-expectations (>= 3.0.0)
91
- rspec-mocks (3.10.2)
92
- diff-lcs (>= 1.2.0, < 2.0)
93
- rspec-support (~> 3.10.0)
94
- rspec-support (3.10.3)
95
- scenic (1.5.4)
96
- activerecord (>= 4.0.0)
97
- railties (>= 4.0.0)
98
- thor (1.1.0)
99
- tzinfo (2.0.4)
100
- concurrent-ruby (~> 1.0)
101
- zeitwerk (2.5.1)
102
-
103
- PLATFORMS
104
- ruby
105
- x86_64-darwin-20
106
-
107
- DEPENDENCIES
108
- database_cleaner-active_record
109
- dotenv
110
- gemika
111
- pry
112
- rake (~> 12.0)
113
- rspec (~> 3.0)
114
- rspec-its
115
- scenic
116
- timescaledb!
117
-
118
- BUNDLED WITH
119
- 2.2.33