currently I'm testing it, but.. got nothing.
actually, I do not know how to use it.
Just for reference.
my DB Link
https://drive.google.com/file/d/1DQ_zDk9A1IeGUHsmSLWeCS5-6JSWkqrV/view?usp=sharing
the name of table is: "translation_units"
the names of two columns I'm interested in are : "source_segment", "target_segment"
it has only 3 items within it. "One/Red", "Two/Green", "Three/Blue" (respectively)
- it has its fields as a XML structure, that is why I have to use RegExp all the time.
How can I extract "Red" or "Three" items using Functions ?
(I am not mentioning XML element values, but field as a whole. I can handle XML animals properly)
I have tried query like this;
"SELECT * FROM translation_units WHERE target_segment REGEXP 'Three';"
Thanks.
[Class] SQLiteDB - Update on 2022-10-04
Re: [Class] SQLiteDB - Update on 2016-03-28
you are using 3 'Name's;
regexp
RegExp
REGEXP
These three of them are the same one or not ?
These three of them are 'Built_In' or not ?
It is quite confusing.
regexp
RegExp
REGEXP
These three of them are the same one or not ?
These three of them are 'Built_In' or not ?
It is quite confusing.
Re: [Class] SQLiteDB - Update on 2016-03-28
I.e.: regexp(Y,X) must be implemented as an application-defined user function. You have to write it completely on your own.The REGEXP operator is a special syntax for the regexp() user function. No regexp() user function is defined by default and so use of the REGEXP operator will normally result in an error message. If an application-defined SQL function named "regexp" is added at run-time, then the "X REGEXP Y" operator will be implemented as a call to "regexp(Y,X)".
Source: The LIKE, GLOB, REGEXP, and MATCH operators
Re: [Class] SQLiteDB - Update on 2016-03-28
hmmm..
Good
I will google it further.
Thanks
Good
I will google it further.
Thanks
Re: [Class] SQLiteDB - Update on 2016-03-28
my conclusion : no it is not working I do not know how to use it (guess, I have problem with argument of "SQLite3_RegExp" function. But, I do not know how to solve it)
[Note]
1. it could be working, if someone who knows well this kind of work tested it.
2. and, If so. It still needs 'Custom Function' not an operator REGEXP. Think about it, If AHK does not have 'Custom Function'. Then I call it 'UseLess' of course. Simple 'REGEXP' operation is much limited.
[Note]
1. it could be working, if someone who knows well this kind of work tested it.
2. and, If so. It still needs 'Custom Function' not an operator REGEXP. Think about it, If AHK does not have 'Custom Function'. Then I call it 'UseLess' of course. Simple 'REGEXP' operation is much limited.
Re: [Class] SQLiteDB - Update on 2016-03-28
Yes.1. it could be working, ...
You can use the REGEXP operator only after you implemented the regexp() function.It still needs 'Custom Function' not an operator REGEXP.
SQLite access functions are not built-in, so why should SQLite custom functions? AHK is able to access SQlite databases via the C/C++-API and AHK is able to implement (simple) SQLite user functions. So what?If AHK does not have 'Custom Function'. Then I call it 'UseLess' of course.
Simple 'REGEXP' operation is much limited.
Re: [Class] SQLiteDB - Update on 2016-03-28
Nice reply.
Then How can I implement regexp() function?
I have followed your guide-perfectly- but have failed to achieve it.
Can you show me one working example ?
Regards
Then How can I implement regexp() function?
I have followed your guide-perfectly- but have failed to achieve it.
Can you show me one working example ?
Regards
Re: [Class] SQLiteDB - Update on 2016-03-28
What did you try?
Re: [Class] SQLiteDB - Update on 2016-03-28
Good
I give it up.
I have already spent lots of time and energy to implement basic SQLITE functionality under AHK hood.
You have nice knowledge about it.
Enjoy it.
Regards
ALL of the SQLITE functionality that I needed was implemented using C# (I have included ALL RegeExp and custom functions).
I am using AHK because it is very easy to use and maintain my codes.
But, for SQLITE, AHK is useless. Amazingly.
Do I have to learn C/C++ API ? for AHK_SQLITE ? No, that is a bad idea.
I give it up.
I have already spent lots of time and energy to implement basic SQLITE functionality under AHK hood.
You have nice knowledge about it.
Enjoy it.
Regards
ALL of the SQLITE functionality that I needed was implemented using C# (I have included ALL RegeExp and custom functions).
I am using AHK because it is very easy to use and maintain my codes.
But, for SQLITE, AHK is useless. Amazingly.
Do I have to learn C/C++ API ? for AHK_SQLITE ? No, that is a bad idea.
Re: [Class] SQLiteDB - Update on 2016-03-28
@jus me, you’ve done enough here. What you provided was more than enough of a start. Thanks for the great info. It may certainly come in handy for me.
Re: [Class] SQLiteDB - Update on 2016-03-28
It would be interesting to see how you did it in C#. And to know, why you don't understand the meaning of the regexp() custom function's parameters, then.
If so, don't use it.But, for SQLITE, AHK is useless. Amazingly.
What's bad with this idea? SQLite provides a nice documentation and the class contains many examples how to call the functions from AHK.Do I have to learn C/C++ API ? for AHK_SQLITE ? No, that is a bad idea.
Re: [Class] SQLiteDB - Update on 2016-03-28
@just me
I am not asking YOU nothing here.
I am just telling YOU that your post has to have "custom functionality"
Without it, your post is useless.
You do not understand it.
As I said ,
You have nice knowledge about SQLITE, C and C++.
And, Clearly, you are enjoying it.
Good for you.
Unfortunately, I do not have any kind of knowledge about C and C++.
But, Fortunately enough, I have finished ALL my SQLITE works within C# - only using the sole language C# (Of course, SQLITE knowledge too).
At there, nobody has twisted my arms to look up C/C++ language documentation.
Because, C# is different from C and C++.
AHK is supposed to familiar with beginner.
You can find it at its first page of its Web ; "... for beginners... beginner friendly... easily create... has never been easier..."
You have a bad idea that AHK users have to know C/C++.
AHK is different from C and C++.
I know you have made very nice post here.
But, you can make your post lot better, if you supported custom functionality too.
Regards
I am not asking YOU nothing here.
I am just telling YOU that your post has to have "custom functionality"
Without it, your post is useless.
You do not understand it.
As I said ,
You have nice knowledge about SQLITE, C and C++.
And, Clearly, you are enjoying it.
Good for you.
Unfortunately, I do not have any kind of knowledge about C and C++.
But, Fortunately enough, I have finished ALL my SQLITE works within C# - only using the sole language C# (Of course, SQLITE knowledge too).
At there, nobody has twisted my arms to look up C/C++ language documentation.
Because, C# is different from C and C++.
AHK is supposed to familiar with beginner.
You can find it at its first page of its Web ; "... for beginners... beginner friendly... easily create... has never been easier..."
You have a bad idea that AHK users have to know C/C++.
AHK is different from C and C++.
I know you have made very nice post here.
But, you can make your post lot better, if you supported custom functionality too.
Regards
Re: [Class] SQLiteDB - Update on 2016-03-28
Wow... thanks to you interesting.
I am adding several lines using which I have successfully/perfectly achieved my SQLITE goals without knowing anything about C/C++ at all
First part is THE "Custom Function"
Second part is a simple query
I guess these two parts are good enough to satisfy your wondering.
Again, You do not needed to have any kind of C/C++ knowledges here.
Regards
I am adding several lines using which I have successfully/perfectly achieved my SQLITE goals without knowing anything about C/C++ at all
First part is THE "Custom Function"
Code: Select all
[SQLiteFunction(Name = "myFunction", Arguments = 2, FuncType = FunctionType.Scalar)]
public class myFunctionClass : SQLiteFunction
{
public override object Invoke(object[] args)
{
return Regex.Replace(Convert.ToString(args[0]), Convert.ToString(args[1]), "${1}", RegexOptions.Singleline).ToLower();
}
}
Code: Select all
"SELECT * FROM translation_units WHERE " + "myFunction(source_segment, '" + myPattern1 + "') == " + "myFunction(target_segment, '" + myPattern2 + "') ";
I guess these two parts are good enough to satisfy your wondering.
Again, You do not needed to have any kind of C/C++ knowledges here.
Regards
Last edited by IMEime on 09 Mar 2019, 10:30, edited 1 time in total.
Re: [Class] SQLiteDB - Update on 2016-03-28
Ok, IMEime, I think you’re done here. Thanks and please move along.
Re: [Class] SQLiteDB - Update on 2016-03-28
@kczx3
Kongrats
from now on
I do not have to see your post
You are blocked from my screen !!!
>kczx3, who is currently on your ignore list, made this post. <-- this is current my screen, you are my new "foe" !!!
Regards
Kongrats
from now on
I do not have to see your post
You are blocked from my screen !!!
>kczx3, who is currently on your ignore list, made this post. <-- this is current my screen, you are my new "foe" !!!
Regards
Re: [Class] SQLiteDB - Update on 2016-03-28
ah
as I said
I have quit
I am not coming back here again
as YOU said, I do/will not use your code.
deleted all of them already.
Good Luck To You
as I said
I have quit
I am not coming back here again
as YOU said, I do/will not use your code.
deleted all of them already.
Good Luck To You
Re: [Class] SQLiteDB - Update on 2016-03-28
But you need some kind of C# knowledge there. I don't know C#, but some kind of 'native' SQLite support seems to be provided by the System.Data.SQlite 'package'.IMEime wrote: ↑09 Mar 2019, 10:15I am adding several lines using which I have successfully/perfectly achieved my SQLITE goals without knowing anything about C/C++ at all
First part is THE "Custom Function"
...
I guess these two parts are good enough to satisfy your wondering.
Again, You do not needed to have any kind of C/C++ knowledges here.
You should know it now.IMEime wrote:My question is very simple and natural for this kind of section and post.
I would like to know How to use custom functions.
OK ?
I don't think that Class_SQLite.ahk is useless. You are just unable to solve your task using it as is or to implement the additional function you need.
Good luck to you, too!
Last edited by just me on 10 Mar 2019, 17:01, edited 1 time in total.
Re: [Class] SQLiteDB - Update on 2016-03-28
Man I feel bad that such insult is given to someone that GAVE a way to use SQLite more easily than starting from scratch... dude man respect the one who provided it for you.
Thats nonsense that you kind of tell him his work is useless.. you should start from scratch and do the work he has already done maybe you would then understand better. Whats bad about the way you talk shit to him is that these kind of things make people bitter and not want to share any more of their good works so please reconsider your positions...
thank you and I know Im not a moderator but common sense made me want to reply.
Thats nonsense that you kind of tell him his work is useless.. you should start from scratch and do the work he has already done maybe you would then understand better. Whats bad about the way you talk shit to him is that these kind of things make people bitter and not want to share any more of their good works so please reconsider your positions...
thank you and I know Im not a moderator but common sense made me want to reply.
-
- Posts: 1472
- Joined: 05 May 2018, 12:23
Re: [Class] SQLiteDB - Update on 2016-03-28
if it possible to use multiple instr ?
Right now part of my statement is
WHERE instr(fname, 'will')
What if I want to do multiples, like WHERE instr(fname, 'will' or 'jim')
Any ideas on this?
Right now part of my statement is
WHERE instr(fname, 'will')
What if I want to do multiples, like WHERE instr(fname, 'will' or 'jim')
Any ideas on this?
Re: [Class] SQLiteDB - Update on 2016-03-28
WHERE instr(frame, “will”) or instr(flame, “Jim”)
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: No registered users and 139 guests