Skip to content
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

no methods for SearchLight.query causing issues in last_up? #33

Open
dvetsch75 opened this issue Dec 24, 2020 · 2 comments
Open

no methods for SearchLight.query causing issues in last_up? #33

dvetsch75 opened this issue Dec 24, 2020 · 2 comments
Assignees

Comments

@dvetsch75
Copy link

I am going through the tutorial in the docs (which is great btw) and can't seem to figure out this part .

After running SearchLight.Generator.newmigration I get the migrations file just fine - it looks like so:

module AddCoverColumn
import SearchLight.Migrations: add_column, add_index

function up()
    add_column(:books, :cover, :string)
end

function down()
     # I am using SQLite
end

end

However, when I run either SearchLight.Migration.last_up() or SearchLight.Migration.status(), I get the following:

ERROR: MethodError: no method matching query(::String; internal=true)
Stacktrace:
 [1] upped_migrations() at C:\Users\dvets\.julia\packages\SearchLight\0MG55\src\Migration.jl:295 
 [2] run_migration(::SearchLight.Migration.DatabaseMigration, ::Symbol; force::Bool) at C:\Users\dvets\.julia\packages\SearchLight\0MG55\src\Migration.jl:237
 [3] #last_up#7 at C:\Users\dvets\.julia\packages\SearchLight\0MG55\src\Migration.jl:118 [inlined]
 [4] last_up() at C:\Users\dvets\.julia\packages\SearchLight\0MG55\src\Migration.jl:118
 [5] top-level scope at none:1

But if I run methods(SearchLight.query) it returns no methods...

I'm pretty far out of my depth here so I'm not sure what I am getting wrong.

Windows 10
Julia 1.5.3
Genie 1.9.1

@FrankUrbach
Copy link
Contributor

FrankUrbach commented Dec 24, 2020

Hallo dvetsch75
For using Searchlight it is necessary to use an adapter e,g. SearchlighSQLight, The preparation and usage of this is described here in the section Accessing databases with SeachLight models.
If you have further questions don’t hesitate to ask any time.
Best Frank

@essenciary
Copy link
Member

Sorry, that tutorial is a bit out of date, please try this: https://genieframework.github.io/Genie.jl/dev/guides/Working_With_Genie_Apps.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants