epsilla 0.0.2 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9735534acaf9e3a5999efd311c5196490ba03dc496c6cf58b3036aa6efa91a3
4
- data.tar.gz: 510f3196a738e8a5b15e70dc2e08e760117ac03b460c73e9225182094d9760f7
3
+ metadata.gz: 992c6ea719370841f7123840d26bf21fbb42077a2540a7b1ffa8e6ca25c851ba
4
+ data.tar.gz: 0ccebd514515b16c9a811fd244a168235f6f06563c5a39b2e2c7109834455e2a
5
5
  SHA512:
6
- metadata.gz: 64233f486d746bbab551b38aeec8941eccd40df601387ebbb77429ae83a8a6f7666536552f4f4cc972b585a238d79ab6c04b22e4e4a4a43778ec0030d156a2a9
7
- data.tar.gz: 3139f12945ac88a04f347d8944a8a0b68db957ce70c392868894e9119fb8b2ff10d125212bc049b9322de6dc10c75fe5fce66dbb8fba9d057f6bd70d34f17f6b
6
+ metadata.gz: 9231c203f1ba09b7d103f7c4a9532a2c757cf6e6f6c9eab5fc3d0e503ca4d921fad69464130d3bcfacb849663959a3eb47a8a4181d0e547ccd693e0f37052d08
7
+ data.tar.gz: 8760e5a3f3483c41454e67d75407a94b26b9b7b4cc60195370354d785a9d2598fb77f06b81c12fe860e936abc2d32e88b7ff7dbd4d319ac187688d20720b8a25
data/CHANGELOG.md CHANGED
File without changes
data/README.md CHANGED
@@ -80,4 +80,6 @@ puts status_code, response
80
80
  ```
81
81
 
82
82
  ## Contributing
83
- Bug reports and pull requests are welcome on GitHub at https://github.com/epsilla-cloud/epsilla-ruby.
83
+ Bug reports and pull requests are welcome on GitHub at https://github.com/epsilla-cloud/epsilla-ruby-client
84
+
85
+ If you have any question or problem, please join our discord https://discord.com/invite/cDaY2CxZc5
@@ -0,0 +1,94 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/epsilla/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "epsilla-ruby"
7
+ spec.version = Epsilla::VERSION
8
+ spec.authors = ["Epsilla Team"]
9
+ spec.email = ["eric@epsilla.com"]
10
+
11
+ spec.summary = "Ruby client for Epsilla Vector Database"
12
+ spec.description = "EpsillaDB is a scalable, high-performance, and cost-effective vector database"
13
+ spec.homepage = "https://github.com/epsilla-cloud/vectordb"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.6.0"
16
+
17
+ # spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
18
+
19
+ spec.metadata["homepage_uri"] = spec.homepage
20
+ spec.metadata["source_code_uri"] = "https://github.com/epsilla-cloud/epsilla-ruby-client"
21
+ spec.metadata["changelog_uri"] = "https://github.com/epsilla-cloud/epsilla-ruby-client/blob/main/CHANGELOG.md"
22
+
23
+ # Specify which files should be added to the gem when it is released.
24
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
+ spec.files = Dir.chdir(__dir__) do
26
+ `git ls-files -z`.split("\x0").reject do |f|
27
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor|Gemfile)})
28
+ end
29
+ end
30
+
31
+ spec.bindir = "exe"
32
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
33
+ spec.require_paths = ["lib"]
34
+
35
+ # Uncomment to register a new dependency of your gem
36
+ # spec.add_dependency "example-gem", "~> 1.0"
37
+ spec.add_dependency "faraday", "~> 1"
38
+
39
+ # For more information and examples about making a new gem, check out our
40
+ # guide at: https://bundler.io/guides/creating_gem.html
41
+ end
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+ # lib = File.expand_path("../lib", __FILE__)
55
+ # $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
56
+ # require "epsilla/version"
57
+
58
+ # Gem::Specification.new do |spec|
59
+ # spec.name = "epsilla"
60
+ # spec.version = Epsilla::VERSION
61
+ # spec.authors = ["Epsilla Team"]
62
+ # spec.email = ["eric@epsilla.com", "admin@epsilla.com"]
63
+
64
+ # spec.summary = "A scalable, high-performance, and cost-effective vector database"
65
+ # spec.description = "A scalable, high-performance, and cost-effective vector database"
66
+ # spec.homepage = "https://github.com/epsilla-cloud/vectordb"
67
+ # spec.license = "MIT"
68
+ # # spec.required_ruby_version = ">= 3.0.0"
69
+
70
+ # # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
71
+ # # to allow pushing to a single host or delete this section to allow pushing to any host.
72
+ # if spec.respond_to?(:metadata)
73
+ # #spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
74
+ # spec.metadata["homepage_uri"] = spec.homepage
75
+ # spec.metadata["source_code_uri"] = "https://github.com/eric-epsilla/epsilla-ruby"
76
+ # spec.metadata["changelog_uri"] = "https://github.com/eric-epsilla/epsilla-ruby"
77
+ # else
78
+ # raise "RubyGems 3.0 or newer is required to protect against " \
79
+ # "public gem pushes."
80
+ # end
81
+
82
+ # # Specify which files should be added to the gem when it is released.
83
+ # # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
84
+ # spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
85
+ # `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
86
+ # end
87
+ # spec.bindir = "exe"
88
+ # spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
89
+ # spec.require_paths = ["lib"]
90
+
91
+ # spec.add_dependency "faraday", "~> 1"
92
+ # spec.add_development_dependency "bundler", "~> 1.17"
93
+ # end
94
+
@@ -30,6 +30,10 @@ table_fields= [
30
30
  status_code, response = client.database.create_table(table_name="MyTable", table_fields=table_fields)
31
31
  puts status_code, response
32
32
 
33
+ # List tables
34
+ status_code, response = client.database.list_tables()
35
+ puts status_code, response
36
+
33
37
  # Insert new vector records into table
34
38
  table_records = [
35
39
  {"ID" => 1, "Doc" => "Berlin", "Embedding" => [0.05, 0.61, 0.76, 0.74]},
data/lib/epsilla/base.rb CHANGED
File without changes
@@ -45,6 +45,19 @@ module Epsilla
45
45
  return response.status, response.body
46
46
  end
47
47
 
48
+ # get a list of table names in current DB
49
+ def list_tables()
50
+ unless @db_name
51
+ raise Exception("[ERROR] Please use_db() first!")
52
+ end
53
+
54
+ response = client.connection.post do |req|
55
+ req.url "/api/#{@db_name}/schema/tables/show"
56
+ end
57
+
58
+ return response.status, response.body
59
+ end
60
+
48
61
  # insert data into table
49
62
  def insert(table_name = "MyTable", table_records = nil)
50
63
  unless @db_name
data/lib/epsilla/error.rb CHANGED
File without changes
File without changes
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Epsilla
4
- VERSION = "0.0.2"
4
+ VERSION = "0.0.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epsilla
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Epsilla Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-17 00:00:00.000000000 Z
11
+ date: 2023-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -35,6 +35,7 @@ files:
35
35
  - CHANGELOG.md
36
36
  - README.md
37
37
  - Rakefile
38
+ - epsilla-ruby.gemspec
38
39
  - examples/hello_epsilla.rb
39
40
  - lib/epsilla.rb
40
41
  - lib/epsilla/base.rb