Giter Club home page Giter Club logo

Comments (11)

tofutim avatar tofutim commented on September 13, 2024

Do you prefer a CreateTable option, a CreateVirtualTable function, or alternatively, create normal tables and then add a virtual table for it. The problem with the latter is that maintenance is a bit annoying. Leaning towards CreateVirtualTable myself...

from sqlite-net.

praeclarum avatar praeclarum commented on September 13, 2024

Actually, I think I would prefer a TableAttribute with an IsVirtual bool property and a Using string property. The CreateTable code could then check for this and submit the different Create table statement.

Does that make sense?

On Jun 28, 2012, at 2:16 PM, tofutim wrote:

Do you prefer a CreateTable option, a CreateVirtualTable function, or alternatively, create normal tables and then add a virtual table for it. The problem with the latter is that maintenance is a bit annoying. Leaning towards CreateVirtualTable myself...


Reply to this email directly or view it on GitHub:
#69 (comment)

from sqlite-net.

tofutim avatar tofutim commented on September 13, 2024

I get it, except sometimes there are more parameters to track. For example,
I use

CREATE VIRTUAL TABLE verses USING FTS4(verse, tokenize=icu);

Where would you keep or track "tokenize=icu"?

Also there is sometimes a locale

CREATE VIRTUAL TABLE names USING fts3(a, b, tokenize=icu en_AU);

On Thu, Jun 28, 2012 at 2:20 PM, Frank A. Krueger <
[email protected]

wrote:

Actually, I think I would prefer a TableAttribute with an IsVirtual bool
property and a Using string property. The CreateTable code could then check
for this and submit the different Create table statement.

Does that make sense?

On Jun 28, 2012, at 2:16 PM, tofutim wrote:

Do you prefer a CreateTable option, a CreateVirtualTable function, or
alternatively, create normal tables and then add a virtual table for it.
The problem with the latter is that maintenance is a bit annoying. Leaning
towards CreateVirtualTable myself...


Reply to this email directly or view it on GitHub:
#69 (comment)


Reply to this email directly or view it on GitHub:
#69 (comment)

from sqlite-net.

praeclarum avatar praeclarum commented on September 13, 2024

ColumnAttribute obviously. :-)

I've been meaning to add TableAttribute and ColumnAttribute with Name properties anyway, so this will be a good start.

Are the tokenizers a fixed set? If so, it would be nice to use an enum with nice names. Can we use CultureInfo for the Culture or are strings better?

Lastly, we will need a static class StringEx { public static bool Matches (string arg) { throw new NotSupportedException (); } } so that we can have Linq support. You can see how LIKE is handled in TableQuery. If you're not comfortable with this, then you can leave it to me.

Also, some tests would be best. What platform do you use?

-Frank

On Jun 28, 2012, at 2:24 PM, tofutim wrote:

I get it, except sometimes there are more parameters to track. For example,
I use

CREATE VIRTUAL TABLE verses USING FTS4(verse, tokenize=icu);

Where would you keep or track "tokenize=icu"?

Also there is sometimes a locale

CREATE VIRTUAL TABLE names USING fts3(a, b, tokenize=icu en_AU);

On Thu, Jun 28, 2012 at 2:20 PM, Frank A. Krueger <
[email protected]

wrote:

Actually, I think I would prefer a TableAttribute with an IsVirtual bool
property and a Using string property. The CreateTable code could then check
for this and submit the different Create table statement.

Does that make sense?

On Jun 28, 2012, at 2:16 PM, tofutim wrote:

Do you prefer a CreateTable option, a CreateVirtualTable function, or
alternatively, create normal tables and then add a virtual table for it.
The problem with the latter is that maintenance is a bit annoying. Leaning
towards CreateVirtualTable myself...


Reply to this email directly or view it on GitHub:
#69 (comment)


Reply to this email directly or view it on GitHub:
#69 (comment)


Reply to this email directly or view it on GitHub:
#69 (comment)

from sqlite-net.

tofutim avatar tofutim commented on September 13, 2024

Wait, tokenize is not really a column, it is some instruction to FTS4. It's
like the Rebuild command which is similarly goofy looking:

INSERT INTO verses(verses) VALUES ('rebuild');

On Thu, Jun 28, 2012 at 2:29 PM, Frank A. Krueger <
[email protected]

wrote:

ColumnAttribute obviously. :-)

I've been meaning to add TableAttribute and ColumnAttribute with Name
properties anyway, so this will be a good start.

Are the tokenizers a fixed set? If so, it would be nice to use an enum
with nice names. Can we use CultureInfo for the Culture or are strings
better?

Lastly, we will need a static class StringEx { public static bool Matches
(string arg) { throw new NotSupportedException (); } } so that we can have
Linq support. You can see how LIKE is handled in TableQuery. If you're not
comfortable with this, then you can leave it to me.

Also, some tests would be best. What platform do you use?

-Frank

On Jun 28, 2012, at 2:24 PM, tofutim wrote:

I get it, except sometimes there are more parameters to track. For
example,
I use

CREATE VIRTUAL TABLE verses USING FTS4(verse, tokenize=icu);

Where would you keep or track "tokenize=icu"?

Also there is sometimes a locale

CREATE VIRTUAL TABLE names USING fts3(a, b, tokenize=icu en_AU);

On Thu, Jun 28, 2012 at 2:20 PM, Frank A. Krueger <
[email protected]

wrote:

Actually, I think I would prefer a TableAttribute with an IsVirtual bool
property and a Using string property. The CreateTable code could then
check
for this and submit the different Create table statement.

Does that make sense?

On Jun 28, 2012, at 2:16 PM, tofutim wrote:

Do you prefer a CreateTable option, a CreateVirtualTable function, or
alternatively, create normal tables and then add a virtual table for it.
The problem with the latter is that maintenance is a bit annoying.
Leaning
towards CreateVirtualTable myself...


Reply to this email directly or view it on GitHub:

#69 (comment)


Reply to this email directly or view it on GitHub:
#69 (comment)


Reply to this email directly or view it on GitHub:
#69 (comment)


Reply to this email directly or view it on GitHub:
#69 (comment)

from sqlite-net.

tofutim avatar tofutim commented on September 13, 2024

Tokenizer is not a fixed set - you can add your own into SQLite (we do...).

I'm using Windows right now (actually now to WinRT) but we do Windows,
WinRT, MonoDroid and and MonoTouch.

On Thu, Jun 28, 2012 at 2:31 PM, E. Timothy Uy [email protected] wrote:

Wait, tokenize is not really a column, it is some instruction to FTS4.
It's like the Rebuild command which is similarly goofy looking:

INSERT INTO verses(verses) VALUES ('rebuild');

On Thu, Jun 28, 2012 at 2:29 PM, Frank A. Krueger <
[email protected]

wrote:

ColumnAttribute obviously. :-)

I've been meaning to add TableAttribute and ColumnAttribute with Name
properties anyway, so this will be a good start.

Are the tokenizers a fixed set? If so, it would be nice to use an enum
with nice names. Can we use CultureInfo for the Culture or are strings
better?

Lastly, we will need a static class StringEx { public static bool Matches
(string arg) { throw new NotSupportedException (); } } so that we can have
Linq support. You can see how LIKE is handled in TableQuery. If you're not
comfortable with this, then you can leave it to me.

Also, some tests would be best. What platform do you use?

-Frank

On Jun 28, 2012, at 2:24 PM, tofutim wrote:

I get it, except sometimes there are more parameters to track. For
example,
I use

CREATE VIRTUAL TABLE verses USING FTS4(verse, tokenize=icu);

Where would you keep or track "tokenize=icu"?

Also there is sometimes a locale

CREATE VIRTUAL TABLE names USING fts3(a, b, tokenize=icu en_AU);

On Thu, Jun 28, 2012 at 2:20 PM, Frank A. Krueger <
[email protected]

wrote:

Actually, I think I would prefer a TableAttribute with an IsVirtual
bool
property and a Using string property. The CreateTable code could then
check
for this and submit the different Create table statement.

Does that make sense?

On Jun 28, 2012, at 2:16 PM, tofutim wrote:

Do you prefer a CreateTable option, a CreateVirtualTable function, or
alternatively, create normal tables and then add a virtual table for
it.
The problem with the latter is that maintenance is a bit annoying.
Leaning
towards CreateVirtualTable myself...


Reply to this email directly or view it on GitHub:

#69 (comment)


Reply to this email directly or view it on GitHub:

#69 (comment)


Reply to this email directly or view it on GitHub:
#69 (comment)


Reply to this email directly or view it on GitHub:
#69 (comment)

from sqlite-net.

praeclarum avatar praeclarum commented on September 13, 2024

[Table(IsVirtual = true, Using = "FTS4")]
public class Verse {
[Column(Tokenizer = SQLiteTokenizers.Icu, Culture = "en_AU")]
public string Verse { get; set; }
public string A { get; set; }
public string B { get; set; }
public string C { get; set; }
}

On Jun 28, 2012, at 2:31 PM, tofutim wrote:

Wait, tokenize is not really a column, it is some instruction to FTS4. It's
like the Rebuild command which is similarly goofy looking:

INSERT INTO verses(verses) VALUES ('rebuild');

On Thu, Jun 28, 2012 at 2:29 PM, Frank A. Krueger <
[email protected]

wrote:

ColumnAttribute obviously. :-)

I've been meaning to add TableAttribute and ColumnAttribute with Name
properties anyway, so this will be a good start.

Are the tokenizers a fixed set? If so, it would be nice to use an enum
with nice names. Can we use CultureInfo for the Culture or are strings
better?

Lastly, we will need a static class StringEx { public static bool Matches
(string arg) { throw new NotSupportedException (); } } so that we can have
Linq support. You can see how LIKE is handled in TableQuery. If you're not
comfortable with this, then you can leave it to me.

Also, some tests would be best. What platform do you use?

-Frank

On Jun 28, 2012, at 2:24 PM, tofutim wrote:

I get it, except sometimes there are more parameters to track. For
example,
I use

CREATE VIRTUAL TABLE verses USING FTS4(verse, tokenize=icu);

Where would you keep or track "tokenize=icu"?

Also there is sometimes a locale

CREATE VIRTUAL TABLE names USING fts3(a, b, tokenize=icu en_AU);

On Thu, Jun 28, 2012 at 2:20 PM, Frank A. Krueger <
[email protected]

wrote:

Actually, I think I would prefer a TableAttribute with an IsVirtual bool
property and a Using string property. The CreateTable code could then
check
for this and submit the different Create table statement.

Does that make sense?

On Jun 28, 2012, at 2:16 PM, tofutim wrote:

Do you prefer a CreateTable option, a CreateVirtualTable function, or
alternatively, create normal tables and then add a virtual table for it.
The problem with the latter is that maintenance is a bit annoying.
Leaning
towards CreateVirtualTable myself...


Reply to this email directly or view it on GitHub:

#69 (comment)


Reply to this email directly or view it on GitHub:
#69 (comment)


Reply to this email directly or view it on GitHub:
#69 (comment)


Reply to this email directly or view it on GitHub:
#69 (comment)


Reply to this email directly or view it on GitHub:
#69 (comment)

from sqlite-net.

tofutim avatar tofutim commented on September 13, 2024

Hmm, I like that.

On Thu, Jun 28, 2012 at 2:34 PM, Frank A. Krueger <
[email protected]

wrote:

[Table(IsVirtual = true, Using = "FTS4")]
public class Verse {
[Column(Tokenizer = SQLiteTokenizers.Icu, Culture = "en_AU")]
public string Verse { get; set; }
public string A { get; set; }
public string B { get; set; }
public string C { get; set; }
}

On Jun 28, 2012, at 2:31 PM, tofutim wrote:

Wait, tokenize is not really a column, it is some instruction to FTS4.
It's
like the Rebuild command which is similarly goofy looking:

INSERT INTO verses(verses) VALUES ('rebuild');

On Thu, Jun 28, 2012 at 2:29 PM, Frank A. Krueger <
[email protected]

wrote:

ColumnAttribute obviously. :-)

I've been meaning to add TableAttribute and ColumnAttribute with Name
properties anyway, so this will be a good start.

Are the tokenizers a fixed set? If so, it would be nice to use an enum
with nice names. Can we use CultureInfo for the Culture or are strings
better?

Lastly, we will need a static class StringEx { public static bool
Matches
(string arg) { throw new NotSupportedException (); } } so that we can
have
Linq support. You can see how LIKE is handled in TableQuery. If you're
not
comfortable with this, then you can leave it to me.

Also, some tests would be best. What platform do you use?

-Frank

On Jun 28, 2012, at 2:24 PM, tofutim wrote:

I get it, except sometimes there are more parameters to track. For
example,
I use

CREATE VIRTUAL TABLE verses USING FTS4(verse, tokenize=icu);

Where would you keep or track "tokenize=icu"?

Also there is sometimes a locale

CREATE VIRTUAL TABLE names USING fts3(a, b, tokenize=icu en_AU);

On Thu, Jun 28, 2012 at 2:20 PM, Frank A. Krueger <
[email protected]

wrote:

Actually, I think I would prefer a TableAttribute with an IsVirtual
bool
property and a Using string property. The CreateTable code could then
check
for this and submit the different Create table statement.

Does that make sense?

On Jun 28, 2012, at 2:16 PM, tofutim wrote:

Do you prefer a CreateTable option, a CreateVirtualTable function, or
alternatively, create normal tables and then add a virtual table for
it.
The problem with the latter is that maintenance is a bit annoying.
Leaning
towards CreateVirtualTable myself...


Reply to this email directly or view it on GitHub:

#69 (comment)


Reply to this email directly or view it on GitHub:

#69 (comment)


Reply to this email directly or view it on GitHub:

#69 (comment)


Reply to this email directly or view it on GitHub:
#69 (comment)


Reply to this email directly or view it on GitHub:
#69 (comment)


Reply to this email directly or view it on GitHub:
#69 (comment)

from sqlite-net.

suprnova32 avatar suprnova32 commented on September 13, 2024

Has this feature been implemented?

from sqlite-net.

praeclarum avatar praeclarum commented on September 13, 2024

@supernova32 Not in the way described here by there is the CreateFlags option on CreateTable to accomplish this.

Still need to implement the attribute.

from sqlite-net.

GioviQ avatar GioviQ commented on September 13, 2024

I would like to use tokenize=unicode61 "remove_diacritics=2".
Is there any alternatives?

from sqlite-net.

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.