zillabyte 0.0.9 → 0.0.10
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.
- checksums.yaml +8 -8
- data/ruby/lib/zillabyte/harness/tuple.rb +43 -2
- data/ruby/lib/zillabyte/version.rb +1 -1
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDJjYmU1N2VjMWUyM2YxODMyNTk4YTE1ZjcxZDIxNDRlODFkYTJiYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Mjg1NzFjMGRlN2YwZjdmZGZjYmQzMzlhMTgzYjk3ZmIwMTRmYmExNw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODQxMjY4ZWVkODQyMWFhNjcwOTRkZmVmNzY4ODYyNzM1MWRkMmViZjkwODFm
|
10
|
+
MTYwY2VlNjA2NThmNGI2ZjEwMDhhMDZkOThjODU1M2ExNzI4OGE5ZjQ4Yzg2
|
11
|
+
MTU0OTI2MmMxZDg2ZTA2ZWExNGI2NGVjZTIxZDU2ZTk1ZDIxNDI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OWQ3NGI4MmU2ZTQxNWIzNDZkNTMyNzdjNjk3ZDk2ZDQ2ZDI4MDM2YzhlMTU3
|
14
|
+
MzA3OWM2NzRhYTNiYzAzNzBkZDM1MmY4NDI0NTMwODU3NDBkNjI5MjRhYWZm
|
15
|
+
ZGI4MDg4ZDk4YTZhMjU4MWJhNDUxMzQ4ZDBjMDM5NzM0YzRkMDk=
|
@@ -5,8 +5,9 @@ class Tuple
|
|
5
5
|
@hash = hash
|
6
6
|
end
|
7
7
|
|
8
|
-
def [](
|
9
|
-
|
8
|
+
def [](name)
|
9
|
+
maybe_build_alias_hash()
|
10
|
+
values[ @_alias_hash[name] || name ]
|
10
11
|
end
|
11
12
|
|
12
13
|
def values
|
@@ -14,6 +15,46 @@ class Tuple
|
|
14
15
|
end
|
15
16
|
|
16
17
|
|
18
|
+
def column_aliases
|
19
|
+
@hash['column_aliases'] || []
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
def maybe_build_alias_hash
|
24
|
+
if @_alias_hash.nil?
|
25
|
+
@_alias_hash = {}
|
26
|
+
# seen_aliases = {}
|
27
|
+
column_aliases.each do |col_hash|
|
28
|
+
|
29
|
+
# rel_name = col_hash["relation_name"]
|
30
|
+
concrete_name = col_hash["concrete_name"]
|
31
|
+
|
32
|
+
# Assume single table for now (api should have ensured that there are no repeated aliases)
|
33
|
+
@_alias_hash[col_hash["alias"]] = concrete_name
|
34
|
+
|
35
|
+
# # Already seen this alias?
|
36
|
+
# alias_str.downcase!
|
37
|
+
# if seen_aliases[alias_str]
|
38
|
+
# @_alias_hash.delete(alias_str)
|
39
|
+
# else
|
40
|
+
# @_alias_hash[alias_str] = concrete_name
|
41
|
+
# end
|
42
|
+
#
|
43
|
+
# # NOTE: this does not support ambiguous column names. This is a problem
|
44
|
+
# # that will likely be addressed by forcing the user to work in SXP land.
|
45
|
+
# # The problem is that multiple relations will have the same column names,
|
46
|
+
# # and we'll need to do a full SQL parse to full disambiguate. Too big of a
|
47
|
+
# # problem for now.
|
48
|
+
#
|
49
|
+
# # Add fully qualified name as well
|
50
|
+
# @_alias_hash["#{rel_name}.#{alias_str}"] = "#{concrete_name}"
|
51
|
+
# seen_aliases[alias_str] = 1
|
52
|
+
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
|
17
58
|
def self.from_hash(hash)
|
18
59
|
begin
|
19
60
|
t = hash.fetch("tuple")
|
metadata
CHANGED
@@ -1,31 +1,31 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zillabyte
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zillabyte
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ! '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ! '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: mkfifo
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: zillabyte-cli
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 0.0.10
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 0.0.10
|
55
55
|
description: The Official Zillabyte Gem
|
56
56
|
email:
|
57
57
|
- gem@zillabyte.com
|