swift_db 0.1.2 → 0.1.4
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/Manifest +1 -0
- data/Rakefile +1 -1
- data/lib/root/binary.rb +2 -1
- data/lib/root/internal_node.rb +3 -4
- data/swift_db.gemspec +2 -2
- metadata +4 -4
data/Manifest
CHANGED
data/Rakefile
CHANGED
data/lib/root/binary.rb
CHANGED
data/lib/root/internal_node.rb
CHANGED
@@ -29,7 +29,6 @@ module Db
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def insert_node_pointer(key_and_node)
|
32
|
-
puts "-------------#{key_and_node}"
|
33
32
|
@keys_and_node_pointers << key_and_node
|
34
33
|
sort_keys
|
35
34
|
split if @keys_and_node_pointers.size > @max_capacity
|
@@ -70,11 +69,11 @@ module Db
|
|
70
69
|
private
|
71
70
|
|
72
71
|
def sort_keys
|
73
|
-
@keys_and_node_pointers.sort!
|
74
|
-
|
72
|
+
@keys_and_node_pointers.sort!
|
73
|
+
end
|
75
74
|
|
76
75
|
def split
|
77
|
-
puts "
|
76
|
+
puts "----New Internal Node Created----"
|
78
77
|
split_index=((@keys_and_node_pointers.length / @max_capacity.to_f).ceil)-1
|
79
78
|
splited_values=@keys_and_node_pointers.values_at(0..split_index)
|
80
79
|
@keys_and_node_pointers.slice!(0..split_index)
|
data/swift_db.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{swift_db}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.4"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Prasath V Ram"]
|
9
|
-
s.date = %q{2010-12-
|
9
|
+
s.date = %q{2010-12-09}
|
10
10
|
s.description = %q{Stores data in a B+tree structure}
|
11
11
|
s.email = %q{ask4prasath@gmail.com}
|
12
12
|
s.extra_rdoc_files = ["README.rdoc", "lib/a.rb", "lib/common/comparison.rb", "lib/db.rb", "lib/root/binary.rb", "lib/root/internal_node.rb", "lib/root/leaf.rb", "lib/root/table.rb", "lib/root/tree.rb", "lib/swift_db.rb"]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: swift_db
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 4
|
10
|
+
version: 0.1.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Prasath V Ram
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-09 00:00:00 +05:30
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|