Skip to content

Experimental database API #347

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2023
Merged

Experimental database API #347

merged 1 commit into from
Mar 24, 2023

Conversation

kddnewton
Copy link
Member

@kddnewton kddnewton commented Mar 24, 2023

Allows doing something like this:

require "sqlite3"

database = SyntaxTree::Database::Connection.new(SQLite3::Database.new(":memory:"))
database.prepare

Dir[File.expand_path("../lib/**/*.rb", __dir__)].each do |filepath|
  database.index_file(filepath)
end

database.search("Binary[left: Binary]").each do |row|
  p row
end

@kddnewton kddnewton merged commit 17928e9 into main Mar 24, 2023
@kddnewton kddnewton deleted the database branch March 24, 2023 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant