hive_sql 1.0.0.pre.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +58 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE +41 -0
  5. data/Rakefile +538 -0
  6. data/bin/hive_sql +23 -0
  7. data/hive_sql.gemspec +41 -0
  8. data/lib/hive_sql.rb +101 -0
  9. data/lib/hive_sql/models/account.rb +119 -0
  10. data/lib/hive_sql/models/block.rb +18 -0
  11. data/lib/hive_sql/models/comment.rb +142 -0
  12. data/lib/hive_sql/models/community.rb +78 -0
  13. data/lib/hive_sql/models/community_role.rb +37 -0
  14. data/lib/hive_sql/models/community_subscriber.rb +23 -0
  15. data/lib/hive_sql/models/connection.rb +18 -0
  16. data/lib/hive_sql/models/dynamic_global_properties.rb +45 -0
  17. data/lib/hive_sql/models/follower.rb +17 -0
  18. data/lib/hive_sql/models/reblog.rb +20 -0
  19. data/lib/hive_sql/models/sql_base.rb +28 -0
  20. data/lib/hive_sql/models/tag.rb +15 -0
  21. data/lib/hive_sql/models/token.rb +27 -0
  22. data/lib/hive_sql/models/transaction.rb +76 -0
  23. data/lib/hive_sql/models/tx/account_create.rb +26 -0
  24. data/lib/hive_sql/models/tx/account_recover.rb +20 -0
  25. data/lib/hive_sql/models/tx/account_update.rb +22 -0
  26. data/lib/hive_sql/models/tx/account_witness_proxy.rb +31 -0
  27. data/lib/hive_sql/models/tx/account_witness_vote.rb +22 -0
  28. data/lib/hive_sql/models/tx/claim_reward_balance.rb +21 -0
  29. data/lib/hive_sql/models/tx/comment.rb +24 -0
  30. data/lib/hive_sql/models/tx/comments_option.rb +23 -0
  31. data/lib/hive_sql/models/tx/convert.rb +20 -0
  32. data/lib/hive_sql/models/tx/custom.rb +25 -0
  33. data/lib/hive_sql/models/tx/custom/community.rb +32 -0
  34. data/lib/hive_sql/models/tx/custom/follow.rb +48 -0
  35. data/lib/hive_sql/models/tx/custom/reblog.rb +22 -0
  36. data/lib/hive_sql/models/tx/custom/witness.rb +11 -0
  37. data/lib/hive_sql/models/tx/delegate_vesting_share.rb +20 -0
  38. data/lib/hive_sql/models/tx/delete_comment.rb +19 -0
  39. data/lib/hive_sql/models/tx/escrow_approve.rb +23 -0
  40. data/lib/hive_sql/models/tx/escrow_dispute.rb +22 -0
  41. data/lib/hive_sql/models/tx/escrow_release.rb +25 -0
  42. data/lib/hive_sql/models/tx/escrow_transfer.rb +28 -0
  43. data/lib/hive_sql/models/tx/feed.rb +20 -0
  44. data/lib/hive_sql/models/tx/limit_order.rb +26 -0
  45. data/lib/hive_sql/models/tx/pow.rb +19 -0
  46. data/lib/hive_sql/models/tx/transfer.rb +24 -0
  47. data/lib/hive_sql/models/tx/update_proposal_vote.rb +31 -0
  48. data/lib/hive_sql/models/tx/vote.rb +21 -0
  49. data/lib/hive_sql/models/tx/withdraw.rb +19 -0
  50. data/lib/hive_sql/models/tx/withdraw_vesting_route.rb +21 -0
  51. data/lib/hive_sql/models/tx/witness_update.rb +24 -0
  52. data/lib/hive_sql/models/vo/author_reward.rb +22 -0
  53. data/lib/hive_sql/models/vo/comment_benefactor_reward.rb +23 -0
  54. data/lib/hive_sql/models/vo/curation_reward.rb +21 -0
  55. data/lib/hive_sql/models/vo/fill_convert_request.rb +21 -0
  56. data/lib/hive_sql/models/vo/fill_order.rb +23 -0
  57. data/lib/hive_sql/models/vo/fill_transfer_from_savings.rb +23 -0
  58. data/lib/hive_sql/models/vo/fill_vesting_withdraw.rb +21 -0
  59. data/lib/hive_sql/models/vo/interest.rb +19 -0
  60. data/lib/hive_sql/models/vo/liquidity_reward.rb +19 -0
  61. data/lib/hive_sql/models/vo/producer_reward.rb +19 -0
  62. data/lib/hive_sql/models/vo/proposal_pay.rb +20 -0
  63. data/lib/hive_sql/models/vo/return_vesting_delegation.rb +20 -0
  64. data/lib/hive_sql/models/vo/shutdown_witness.rb +18 -0
  65. data/lib/hive_sql/models/vo/sps_fund.rb +18 -0
  66. data/lib/hive_sql/models/witness.rb +48 -0
  67. data/lib/hive_sql/version.rb +3 -0
  68. metadata +413 -0
data/bin/hive_sql ADDED
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'hive_sql'
4
+
5
+ puts '#'*40
6
+ puts '#'*40
7
+ puts "Welcome to HiveSQL Version: #{HiveSQL::VERSION}"
8
+ puts '#'*40
9
+ puts '#'*40
10
+ puts ''
11
+
12
+ case ARGV[0]
13
+ when 'todo'
14
+ puts 'todo'
15
+ else
16
+ STDOUT.puts <<~EOF
17
+ Please provide command name
18
+
19
+ Usage:
20
+ hive_sql todo
21
+ hive_sql help
22
+ EOF
23
+ end
data/hive_sql.gemspec ADDED
@@ -0,0 +1,41 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'hive_sql/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'hive_sql'
8
+ spec.version = HiveSQL::VERSION
9
+ spec.authors = ['Anthony Martin (inertia)']
10
+ spec.email = ['hive_sql@martin-studio.com']
11
+
12
+ spec.summary = %q{Ruby/Rails wrapper for HiveSQL.io}
13
+ spec.description = %q{Rails compatible gem that provides full DB connection and models to HiveSQL.io}
14
+ spec.homepage = 'https://github.com/inertia186/hive_sql'
15
+ spec.license = 'CC0-1.0'
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
+ f.match(%r{^(test|spec|features)/})
19
+ end
20
+ spec.bindir = 'bin'
21
+ spec.executables = 'hive_sql'
22
+ spec.require_paths = ['lib']
23
+
24
+ spec.add_development_dependency 'bundler', '~> 2.0', '>= 2.0.1'
25
+ spec.add_development_dependency 'rake', '~> 12.1', '>= 12.1.0'
26
+ spec.add_development_dependency 'minitest-proveit', '~> 1.0', '>= 1.0.0'
27
+ spec.add_development_dependency 'minitest', '~> 5.10', '>= 5.10.3'
28
+ spec.add_development_dependency 'minitest-line', '~> 0.6', '>= 0.6.4'
29
+ spec.add_development_dependency 'simplecov', '~> 0.11', '>= 0.11.2'
30
+ spec.add_development_dependency 'yard', '~> 0.9', '>= 0.9.16'
31
+ spec.add_development_dependency 'rb-readline', '~> 0.5', '>= 0.5.5'
32
+ spec.add_development_dependency 'irb', '~> 1.0', '>= 1.0.0'
33
+
34
+ spec.add_runtime_dependency 'nokogiri', ['~> 1.8']
35
+ spec.add_runtime_dependency 'rest-client', ['~> 2.0']
36
+ spec.add_runtime_dependency 'activerecord', ['>= 4', '< 6']
37
+ spec.add_runtime_dependency 'tiny_tds', ['~> 2.1']
38
+ spec.add_runtime_dependency 'activerecord-sqlserver-adapter', ['>= 4', '< 6']
39
+ spec.add_runtime_dependency 'activesupport', ['>= 4', '< 6']
40
+ spec.add_runtime_dependency 'awesome_print', '~> 1.7', '>= 1.7.0'
41
+ end
data/lib/hive_sql.rb ADDED
@@ -0,0 +1,101 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+ require "hive_sql/version"
4
+
5
+ # Top Level Models
6
+ require "hive_sql/models/sql_base"
7
+ require "hive_sql/models/account"
8
+ require "hive_sql/models/block"
9
+ require "hive_sql/models/comment"
10
+ require "hive_sql/models/connection"
11
+ require "hive_sql/models/community"
12
+ require "hive_sql/models/community_subscriber"
13
+ require "hive_sql/models/community_role"
14
+ require "hive_sql/models/dynamic_global_properties"
15
+ require "hive_sql/models/follower"
16
+ require "hive_sql/models/reblog"
17
+ require "hive_sql/models/tag"
18
+ require "hive_sql/models/token"
19
+ require "hive_sql/models/transaction"
20
+ require "hive_sql/models/witness"
21
+
22
+ # Sub Level Models
23
+ require "hive_sql/models/tx/account_create"
24
+ require "hive_sql/models/tx/account_recover"
25
+ require "hive_sql/models/tx/account_update"
26
+ require "hive_sql/models/tx/account_witness_proxy"
27
+ require "hive_sql/models/tx/account_witness_vote"
28
+ require "hive_sql/models/tx/claim_reward_balance"
29
+ require "hive_sql/models/tx/comment"
30
+ require "hive_sql/models/tx/comments_option"
31
+ require "hive_sql/models/tx/convert"
32
+ require "hive_sql/models/tx/custom"
33
+ require "hive_sql/models/tx/delegate_vesting_share"
34
+ require "hive_sql/models/tx/delete_comment"
35
+ require "hive_sql/models/tx/escrow_approve"
36
+ require "hive_sql/models/tx/escrow_dispute"
37
+ require "hive_sql/models/tx/escrow_release"
38
+ require "hive_sql/models/tx/escrow_transfer"
39
+ require "hive_sql/models/tx/feed"
40
+ require "hive_sql/models/tx/limit_order"
41
+ require "hive_sql/models/tx/pow"
42
+ require "hive_sql/models/tx/transfer"
43
+ require "hive_sql/models/tx/update_proposal_vote"
44
+ require "hive_sql/models/tx/vote"
45
+ require "hive_sql/models/tx/withdraw"
46
+ require "hive_sql/models/tx/withdraw_vesting_route"
47
+ require "hive_sql/models/tx/witness_update"
48
+
49
+ require "hive_sql/models/tx/custom/follow"
50
+ require "hive_sql/models/tx/custom/witness"
51
+ require "hive_sql/models/tx/custom/reblog"
52
+ require "hive_sql/models/tx/custom/community"
53
+
54
+ require "hive_sql/models/vo/author_reward"
55
+ require "hive_sql/models/vo/comment_benefactor_reward"
56
+ require "hive_sql/models/vo/curation_reward"
57
+ require "hive_sql/models/vo/fill_convert_request"
58
+ require "hive_sql/models/vo/fill_order"
59
+ require "hive_sql/models/vo/fill_transfer_from_savings"
60
+ require "hive_sql/models/vo/fill_vesting_withdraw"
61
+ require "hive_sql/models/vo/interest"
62
+ require "hive_sql/models/vo/liquidity_reward"
63
+ require "hive_sql/models/vo/producer_reward"
64
+ require "hive_sql/models/vo/return_vesting_delegation"
65
+ require "hive_sql/models/vo/shutdown_witness"
66
+ require "hive_sql/models/vo/sps_fund"
67
+ require "hive_sql/models/vo/proposal_pay"
68
+
69
+ module HiveSQL
70
+ end
71
+
72
+ # Monkeypatch to implement: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/issues/274#issuecomment-167578393
73
+ # Copied from: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/blob/d4b6e4134e15d8d73be48ad6d8da1911f7001d9e/lib/active_record/connection_adapters/sqlserver/schema_statements.rb
74
+ # Switched "sp_helptext" from above (#view_information) to use "sp_columns"
75
+ module ActiveRecord
76
+ module ConnectionAdapters
77
+ module SQLServer
78
+ module SchemaStatements
79
+ def view_information(table_name)
80
+ @view_information ||= {}
81
+ @view_information[table_name] ||= begin
82
+ identifier = SQLServer::Utils.extract_identifiers(table_name)
83
+ view_info = select_one "SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = #{quote(identifier.object)}", 'SCHEMA'
84
+ if view_info
85
+ view_info = view_info.with_indifferent_access
86
+ if view_info[:VIEW_DEFINITION].blank? || view_info[:VIEW_DEFINITION].length == 4000
87
+ view_info[:VIEW_DEFINITION] = begin
88
+ select_values("EXEC sp_columns #{identifier.object_quoted}", 'SCHEMA').join
89
+ rescue
90
+ warn "No view definition found, possible permissions problem.\nPlease run GRANT VIEW DEFINITION TO your_user;"
91
+ nil
92
+ end
93
+ end
94
+ end
95
+ view_info
96
+ end
97
+ end
98
+ end
99
+ end
100
+ end
101
+ end
@@ -0,0 +1,119 @@
1
+ module HiveSQL
2
+ class Account < HiveSQL::SqlBase
3
+
4
+ self.table_name = :Accounts
5
+
6
+ has_many :follows, foreign_key: :follower, class_name: 'Follower', primary_key: :name
7
+ has_many :following, through: :follows, source: :following_account
8
+ has_many :inverse_follows, foreign_key: :following, class_name: 'Follower', primary_key: :name
9
+ has_many :followers, through: :inverse_follows, source: :follower_account
10
+
11
+ has_many :reblogs, foreign_key: :account, class_name: 'Reblog', primary_key: :name
12
+
13
+ belongs_to :witness, foreign_key: :name, primary_key: :name
14
+
15
+ has_many :roles, foreign_key: :account, class_name: 'HiveSQL::CommunityRole', primary_key: :name
16
+ has_many :guest_roles, -> { guests }, foreign_key: :account, class_name: 'HiveSQL::CommunityRole', primary_key: :name
17
+ has_many :member_roles, -> { members }, foreign_key: :account, class_name: 'HiveSQL::CommunityRole', primary_key: :name
18
+ has_many :mod_roles, -> { mods }, foreign_key: :account, class_name: 'HiveSQL::CommunityRole', primary_key: :name
19
+ has_many :admin_roles, -> { admins }, foreign_key: :account, class_name: 'HiveSQL::CommunityRole', primary_key: :name
20
+ has_many :muted_roles, -> { muted }, foreign_key: :account, class_name: 'HiveSQL::CommunityRole', primary_key: :name
21
+
22
+ has_many :communities, through: :roles, source: :community_record
23
+ has_many :guest_communities, through: :guest_roles, source: :community_record
24
+ has_many :member_communities, through: :member_roles, source: :community_record
25
+ has_many :mod_communities, through: :mod_roles, source: :community_record
26
+ has_many :admin_communities, through: :admin_roles, source: :community_record
27
+ has_many :muted_communities, through: :muted_roles, source: :community_record
28
+
29
+ has_many :subscriptions, foreign_key: :subscriber, class_name: 'HiveSQL::CommunitySubscriber', primary_key: :name
30
+ has_many :subscribed_communities, through: :subscriptions, source: :community_record
31
+
32
+ scope :before, lambda { |before, field = 'created'| where("#{field} < ?", before) }
33
+ scope :after, lambda { |after, field = 'created'| where("#{field} > ?", after) }
34
+ scope :today, -> { after(1.day.ago) }
35
+ scope :yesterday, -> { before(1.day.ago).after(2.days.ago) }
36
+
37
+ scope :mined, lambda { |mined = true| where(mined: mined) }
38
+
39
+ def all_communities
40
+ HiveSQL::Community.where('name IN(?) OR name IN(?)', roles.select(:community), subscriptions.select(:community))
41
+ end
42
+
43
+ def witness?
44
+ !!witness
45
+ end
46
+
47
+ def proxied_vsf_votes_total
48
+ JSON[proxied_vsf_votes].map(&:to_i).sum
49
+ end
50
+ end
51
+ end
52
+
53
+ # Structure
54
+ #
55
+ # HiveSQL::Account(
56
+ # id: varchar,
57
+ # name: varchar,
58
+ # owner: varchar_max,
59
+ # active: varchar_max,
60
+ # posting: varchar_max,
61
+ # memo_key: varchar_max,
62
+ # json_metadata: text,
63
+ # proxy: varchar,
64
+ # last_owner_update: datetime,
65
+ # last_account_update: datetime,
66
+ # created: datetime,
67
+ # mined: boolean,
68
+ # owner_challenged: boolean,
69
+ # active_challenged: boolean,
70
+ # last_owner_proved: datetime,
71
+ # last_active_proved: datetime,
72
+ # recovery_account: varchar,
73
+ # last_account_recovery: datetime,
74
+ # reset_account: varchar,
75
+ # comment_count: integer,
76
+ # lifetime_vote_count: integer,
77
+ # post_count: integer,
78
+ # can_vote: boolean,
79
+ # voting_power: integer,
80
+ # last_vote_time: datetime,
81
+ # balance: varchar,
82
+ # savings_balance: varchar,
83
+ # sbd_balance: varchar,
84
+ # sbd_seconds: integer,
85
+ # sbd_seconds_last_update: datetime,
86
+ # sbd_last_interest_payment: datetime,
87
+ # savings_sbd_balance: varchar,
88
+ # savings_sbd_seconds: integer,
89
+ # savings_sbd_seconds_last_update: datetime,
90
+ # savings_sbd_last_interest_payment: datetime,
91
+ # savings_withdraw_requests: integer,
92
+ # vesting_shares: varchar,
93
+ # vesting_withdraw_rate: varchar,
94
+ # next_vesting_withdrawal: datetime,
95
+ # withdrawn: integer,
96
+ # to_withdraw: integer,
97
+ # withdraw_routes: integer,
98
+ # curation_rewards: integer,
99
+ # posting_rewards: integer,
100
+ # proxied_vsf_votes: varchar_max,
101
+ # witnesses_voted_for: integer,
102
+ # average_bandwidth: integer,
103
+ # lifetime_bandwidth: integer,
104
+ # last_bandwidth_update: datetime,
105
+ # average_market_bandwidth: integer,
106
+ # last_market_bandwidth_update: datetime,
107
+ # last_post: datetime,
108
+ # last_root_post: datetime,
109
+ # vesting_balance: varchar,
110
+ # reputation: integer,
111
+ # transfer_history: varchar_max,
112
+ # market_history: varchar_max,
113
+ # post_history: varchar_max,
114
+ # vote_history: varchar_max,
115
+ # other_history: varchar_max,
116
+ # witness_votes: varchar_max,
117
+ # dirty: boolean,
118
+ # TS: ss_timestamp
119
+ # )
@@ -0,0 +1,18 @@
1
+ module HiveSQL
2
+ class Block < HiveSQL::SqlBase
3
+
4
+ self.table_name = :Blocks
5
+ self.primary_key = :block_num
6
+
7
+ has_many :transactions, foreign_key: :block_num
8
+
9
+ end
10
+ end
11
+
12
+ # Structure
13
+ #
14
+ # HiveSQL::Block(
15
+ # block_num: integer,
16
+ # timestamp: datetime,
17
+ # witness: varchar
18
+ # )
@@ -0,0 +1,142 @@
1
+ module HiveSQL
2
+ class Comment < HiveSQL::SqlBase
3
+
4
+ self.table_name = :Comments
5
+
6
+ has_many :tags, foreign_key: 'comment_ID'
7
+
8
+ belongs_to :author_record, foreign_key: :author, class_name: 'HiveSQL::Account', primary_key: :name
9
+ belongs_to :community_record, foreign_key: :category, class_name: 'HiveSQL::Community', primary_key: :name
10
+
11
+ scope :depth, lambda { |depth| where(depth: depth) }
12
+
13
+ scope :community, lambda { |community|
14
+ case community
15
+ when String then where(category: community)
16
+ else
17
+ where(category: community.name)
18
+ end
19
+ }
20
+
21
+ scope :before, lambda { |before, field = 'created'| where("#{field} < ?", before) }
22
+ scope :after, lambda { |after, field = 'created'| where("#{field} > ?", after) }
23
+ scope :today, -> { after(1.day.ago) }
24
+ scope :yesterday, -> { before(1.day.ago).after(2.days.ago) }
25
+
26
+ scope :normalized_json, -> { where("json_metadata LIKE '{%}' AND ISJSON(json_metadata) > 0") }
27
+
28
+ scope :app, lambda { |app|
29
+ normalized_json.where("JSON_VALUE(json_metadata, '$.app') LIKE ?", "#{app}/%")
30
+ }
31
+
32
+ scope :app_version, lambda { |version|
33
+ normalized_json.where("JSON_VALUE(json_metadata, '$.app') LIKE ?", "%/#{version}")
34
+ }
35
+
36
+ scope :community, lambda {|community| joins(:community_record).where(category: community)}
37
+ scope :author, lambda {|author| joins(:author_record).where(author: author)}
38
+
39
+ scope :tagged, lambda { |tag, options = {exclude_category: false}|
40
+ exclude_category = !!options[:exclude_category]
41
+
42
+ if exclude_category
43
+ where(id: HiveSQL::Tag.where(tag: tag).select(:comment_ID))
44
+ else
45
+ where("ID IN(?) OR category = ?", HiveSQL::Tag.where(tag: tag).select(:comment_ID), tag)
46
+ end
47
+ }
48
+
49
+ scope :decorate_metadata, -> {
50
+ previous_select = if all.select_values.none?
51
+ Arel.star
52
+ else
53
+ all.select_values
54
+ end
55
+
56
+ r = normalized_json.select(previous_select)
57
+
58
+ %w(tags image links app format).each do |key|
59
+ r = r.select("JSON_VALUE(json_metadata, '$.#{key}') AS metadata_#{key}")
60
+ end
61
+
62
+ r
63
+ }
64
+
65
+ scope :beneficiaries, lambda { |account|
66
+ where("JSON_VALUE(beneficiaries, '$.account') IN(?)", [account].flatten)
67
+ }
68
+
69
+ def self.find_by_author(author)
70
+ where(author: author).first
71
+ end
72
+
73
+ def self.find_by_parent(parent_author)
74
+ where(parent_author: parent_author).first
75
+ end
76
+
77
+ def self.find_by_author_and_permlink(author, permlink)
78
+ where(author: author, permlink: permlink).first
79
+ end
80
+
81
+ def beneficiaries
82
+ JSON[self[:beneficiaries]]
83
+ end
84
+
85
+ def tag_names
86
+ tags.pluck(:tag)
87
+ end
88
+ end
89
+ end
90
+
91
+ # Strcture
92
+ #
93
+ # HiveSQL::Comment(
94
+ # ID: integer,
95
+ # author: varchar,
96
+ # permlink: varchar,
97
+ # category: varchar,
98
+ # parent_author: varchar,
99
+ # parent_permlink: varchar,
100
+ # title: text,
101
+ # body: text,
102
+ # json_metadata: text,
103
+ # last_update: datetime,
104
+ # created: datetime,
105
+ # active: datetime,
106
+ # last_payout: datetime,
107
+ # depth: integer,
108
+ # children: integer,
109
+ # net_rshares: integer,
110
+ # abs_rshares: integer,
111
+ # vote_rshares: integer,
112
+ # children_abs_rshares: integer,
113
+ # cashout_time: datetime,
114
+ # max_cashout_time: datetime,
115
+ # total_vote_weight: float,
116
+ # reward_weight: integer,
117
+ # total_payout_value: money,
118
+ # curator_payout_value: money,
119
+ # author_rewards: money,
120
+ # net_votes: integer,
121
+ # root_comment: varchar,
122
+ # mode: varchar,
123
+ # max_accepted_payout: money,
124
+ # percent_steem_dollars: integer,
125
+ # allow_replies: boolean,
126
+ # allow_votes: boolean,
127
+ # allow_curation_rewards: boolean,
128
+ # beneficiaries: varchar_max,
129
+ # url: varchar_max,
130
+ # root_title: text,
131
+ # pending_payout_value: money,
132
+ # total_pending_payout_value: money,
133
+ # active_votes: varchar_max,
134
+ # replies: varchar_max,
135
+ # author_reputation: integer,
136
+ # promoted: varchar,
137
+ # body_length: integer,
138
+ # reblogged_by: varchar_max,
139
+ # body_language: varchar,
140
+ # dirty: boolean,
141
+ # TS: ss_timestamp
142
+ # )