GithubHelp home page GithubHelp logo

Comments (29)

fnc12 avatar fnc12 commented on June 7, 2024 1

hey Trevor. I'll start implementing this soon. Thanks

from sqlite_orm.

fnc12 avatar fnc12 commented on June 7, 2024 1

PR is on its way #1279

from sqlite_orm.

fnc12 avatar fnc12 commented on June 7, 2024 1

@trevornagy please check unindexed() column constraint function in dev branch. Other features are on its way and will be merged soon

from sqlite_orm.

trevornagy avatar trevornagy commented on June 7, 2024 1

Sorry! You're correct, I copied the incorrect commit id. It works as expected.

from sqlite_orm.

trevornagy avatar trevornagy commented on June 7, 2024 1

Thank you very much for your quick work by the way!

from sqlite_orm.

fnc12 avatar fnc12 commented on June 7, 2024 1

@trevornagy please check new prefix function in dev branch

from sqlite_orm.

fnc12 avatar fnc12 commented on June 7, 2024 1

@trevornagy thanks for pointing out. This is my misunderstanding. I'll refactor it soon as a table constraint not column constraint

from sqlite_orm.

fnc12 avatar fnc12 commented on June 7, 2024 1

@trevornagy this is good! Only tokenize table constraint left to close this issue. I'll add it soon

from sqlite_orm.

fnc12 avatar fnc12 commented on June 7, 2024 1

@trevornagy sorry I forgot to mention content. Just my negligence, of course content will be implemented within this issue ASAP

from sqlite_orm.

fnc12 avatar fnc12 commented on June 7, 2024 1

@trevornagy I got a question: how are you going to use tokenize feature? Do you have exact SQL you expect to be used? It can help me with unit tests

from sqlite_orm.

fnc12 avatar fnc12 commented on June 7, 2024 1

PR #1292

from sqlite_orm.

fnc12 avatar fnc12 commented on June 7, 2024 1

@trevornagy please check tokenize feature in dev

from sqlite_orm.

trevornagy avatar trevornagy commented on June 7, 2024 1

Hey @fnc12, my apologies for the delayed response. I think I'll need content='tbl', to replicate the following example below.

What I'm trying to accomplish is documented here: https://www.sqlite.org/fts5.html#external_content_tables

The example in sqlite would look something like:

-- Create a table. And an external content fts5 table to index it.
CREATE TABLE tbl(a INTEGER PRIMARY KEY, b, c);
CREATE VIRTUAL TABLE fts_idx USING fts5(b, c, content='tbl');

What's missing is being able to specify the external content b & c in this table.
I personally do not need the content_rowid option as I just use the default.

Once again, sorry for the delayed response!

from sqlite_orm.

trevornagy avatar trevornagy commented on June 7, 2024

@fnc12 Just tested with the unindexed PR commit on dev, getting the following errors:

1>  error C2039: 'unindexed': is not a member of 'sqlite_orm'
1>  sqlite_orm.h(23342,11):
1>  see declaration of 'sqlite_orm'
1>   error C3861: 'unindexed': identifier not found
1> error C2672: 'sqlite_orm::make_column': no matching overloaded function found
1>  sqlite_orm.h(2994,37):
1>  could be 'sqlite_orm::internal::column_t<G,S,Op...> sqlite_orm::make_column(std::string,G,S,Op...)'

from sqlite_orm.

fnc12 avatar fnc12 commented on June 7, 2024

@trevornagy unindexed function exists in dev branch. Proof https://github.com/fnc12/sqlite_orm/blob/dev/include/sqlite_orm/sqlite_orm.h#L2183. I bet you messed up with the commits. Just pull dev branch, it should work

from sqlite_orm.

fnc12 avatar fnc12 commented on June 7, 2024

PR with prefix is on its way #1282

from sqlite_orm.

trevornagy avatar trevornagy commented on June 7, 2024

@fnc12 Looked at the API and it looks like you create the prefix inside a make_column? This seems strange to me as each prefix doesn't apply to a column but rather the whole table?

https://www.sqlite.org/fts5.html#prefix_indexes

The test in using_fts5.cpp has the expected as: expected = R"(USING FTS5("title", "body" prefix=2))";
But I would expect it as: expected = R"(USING FTS5("title", "body", prefix=2))";

Note the , between "body" and "prefix=2"

Maybe I'm misinterpreting the example/test though?

from sqlite_orm.

fnc12 avatar fnc12 commented on June 7, 2024

PR is here #1284
@trevornagy btw you can still use prefix func at table level anyway

from sqlite_orm.

fnc12 avatar fnc12 commented on June 7, 2024

@trevornagy prefix fix is merged

from sqlite_orm.

trevornagy avatar trevornagy commented on June 7, 2024

Awesome, works as expected now. Thank you!

from sqlite_orm.

trevornagy avatar trevornagy commented on June 7, 2024

Content was originally requested as well as tokenizer, but yes, amazing work. Really appreciated

from sqlite_orm.

trevornagy avatar trevornagy commented on June 7, 2024

Sure, here's an example of tokenize: tokenize='unicode61 remove_diacritics 1'

from sqlite_orm.

fnc12 avatar fnc12 commented on June 7, 2024

PR with content is on its way #1296

from sqlite_orm.

fnc12 avatar fnc12 commented on June 7, 2024

@trevornagy please check content function in dev branch

from sqlite_orm.

fnc12 avatar fnc12 commented on June 7, 2024

@trevornagy do you also need contentless_delete, content=tbl and content_rowid?

from sqlite_orm.

trevornagy avatar trevornagy commented on June 7, 2024

Will test soon, sorry. As for the others, let me verify works with what we currently have and I'll get back to you! Thanks for all the work so far

from sqlite_orm.

fnc12 avatar fnc12 commented on June 7, 2024

@trevornagy table content is on its way #1304

from sqlite_orm.

fnc12 avatar fnc12 commented on June 7, 2024

hey @trevornagy . Please check out dev for new content<User>() function which you asked about. Also please say whether all required sub-features of FTS5 are implemented. Thanks

from sqlite_orm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.