td-client 0.8.39 → 0.8.40
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.
- data/ChangeLog +5 -0
- data/lib/td/client.rb +2 -2
- data/lib/td/client/api.rb +2 -1
- data/lib/td/client/model.rb +6 -1
- data/lib/td/client/version.rb +1 -1
- metadata +2 -2
data/ChangeLog
CHANGED
data/lib/td/client.rb
CHANGED
|
@@ -99,9 +99,9 @@ class Client
|
|
|
99
99
|
# => [Table]
|
|
100
100
|
def tables(db_name)
|
|
101
101
|
m = @api.list_tables(db_name)
|
|
102
|
-
m.map {|table_name,(type,schema,count,created_at,updated_at,estimated_storage_size)|
|
|
102
|
+
m.map {|table_name,(type,schema,count,created_at,updated_at,estimated_storage_size, last_import)|
|
|
103
103
|
schema = Schema.new.from_json(schema)
|
|
104
|
-
Table.new(self, db_name, table_name, type, schema, count, created_at, updated_at, estimated_storage_size)
|
|
104
|
+
Table.new(self, db_name, table_name, type, schema, count, created_at, updated_at, estimated_storage_size, last_import)
|
|
105
105
|
}
|
|
106
106
|
end
|
|
107
107
|
|
data/lib/td/client/api.rb
CHANGED
|
@@ -243,9 +243,10 @@ class API
|
|
|
243
243
|
count = (m['count'] || 0).to_i # TODO?
|
|
244
244
|
created_at = m['created_at']
|
|
245
245
|
updated_at = m['updated_at']
|
|
246
|
+
last_import = m['counter_updated_at']
|
|
246
247
|
estimated_storage_size = m['estimated_storage_size'].to_i
|
|
247
248
|
schema = JSON.parse(m['schema'] || '[]')
|
|
248
|
-
result[name] = [type, schema, count, created_at, updated_at, estimated_storage_size]
|
|
249
|
+
result[name] = [type, schema, count, created_at, updated_at, estimated_storage_size, last_import]
|
|
249
250
|
}
|
|
250
251
|
return result
|
|
251
252
|
end
|
data/lib/td/client/model.rb
CHANGED
|
@@ -98,7 +98,7 @@ class Database < Model
|
|
|
98
98
|
end
|
|
99
99
|
|
|
100
100
|
class Table < Model
|
|
101
|
-
def initialize(client, db_name, table_name, type, schema, count, created_at=nil, updated_at=nil, estimated_storage_size=nil)
|
|
101
|
+
def initialize(client, db_name, table_name, type, schema, count, created_at=nil, updated_at=nil, estimated_storage_size=nil, last_import=nil)
|
|
102
102
|
super(client)
|
|
103
103
|
@db_name = db_name
|
|
104
104
|
@table_name = table_name
|
|
@@ -108,6 +108,7 @@ class Table < Model
|
|
|
108
108
|
@created_at = created_at
|
|
109
109
|
@updated_at = updated_at
|
|
110
110
|
@estimated_storage_size = estimated_storage_size
|
|
111
|
+
@last_import = last_import
|
|
111
112
|
end
|
|
112
113
|
|
|
113
114
|
attr_reader :type, :db_name, :table_name, :schema, :count, :estimated_storage_size
|
|
@@ -123,6 +124,10 @@ class Table < Model
|
|
|
123
124
|
@updated_at && !@updated_at.empty? ? Time.parse(@updated_at) : nil
|
|
124
125
|
end
|
|
125
126
|
|
|
127
|
+
def last_import
|
|
128
|
+
@last_import && !@last_import.empty? ? Time.parse(@last_import) : nil
|
|
129
|
+
end
|
|
130
|
+
|
|
126
131
|
def database
|
|
127
132
|
@client.database(@db_name)
|
|
128
133
|
end
|
data/lib/td/client/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: td-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.40
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-12-
|
|
12
|
+
date: 2012-12-27 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: msgpack
|