Re: [sqlite] New word to replace "serverless"

2020-01-28 Thread Acer Yang
On Tue, Jan 28, 2020, 16:13 Cory Nelson  wrote:

> in-situ
>
> I think this distinguishes sqlite as being different from an "in-proc yet
> separate server".
>
> On Mon, Jan 27, 2020 at 2:19 PM Richard Hipp  wrote:
>
> > For many years I have described SQLite as being "serverless", as a way
> > to distinguish it from the more traditional client/server design of
> > RDBMSes.  "Serverless" seemed like the natural term to use, as it
> > seems to mean "without a server".
> >
> > But more recently, "serverless" has become a popular buzz-word that
> > means "managed by my hosting provider rather than by me."  Many
> > readers have internalized this new marketing-driven meaning for
> > "serverless" and are hence confused when they see my claim that
> > "SQLite is serverless".
> >
> > How can I fix this?  What alternative word can I use in place of
> > "serverless" to mean "without a server"?
> >
> > Note that "in-process" and "embedded" are not adequate substitutes for
> > "serverless".  An RDBMS might be in-process or embedded but still be
> > running a server in a separate thread. In fact, that is how most
> > embedded RDBMSes other than SQLite work, if I am not much mistaken.
> >
> > When I say "serverless" I mean that the application invokes a
> > function, that function performs some task on behalf of the
> > application, then the function returns, *and that is all*.  No threads
> > are left over, running in the background to do housekeeping.  The
> > function does send messages to some other thread or process.  The
> > function does not have an event loop.  The function does not have its
> > own stack. The function (with its subfunctions) does all the work
> > itself, using the callers stack, then returns control to the caller.
> >
> > So what do I call this, if I can no longer use the word "serverless"
> > without confusing people?
> >
> > "no-server"?
> > "sans-server"?
> > "stackless"?
> > "non-client/server"?
> >
> >
> > --
> > D. Richard Hipp
> > d...@sqlite.org
> > ___
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
>
>
> --
> Cory Nelson
> http://int64.org
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


How about 'immediate'?

>
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Prebuilt Windows x86 binary missing symbols per sqlite3.def

2017-06-03 Thread Acer Yang
Sqlite version is 3190220.
x86 and x64 prebuilt Windows binaries are downloaded from
https://www.sqlite.org/download.html

I compared sqlite3.def files with sort and diff tools.
Some missing symbols as of x86 def file are listed below.

sqlite3_data_directory
sqlite3_fts5_may_be_corrupt
sqlite3_temp_directory
sqlite3_version

That should cause link errors per .lib created from the .def file.

Best wishes,
Acer
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQLite custom function for regular expression using c/c++

2016-05-05 Thread Acer Yang
Hi Bhagwat,

I try to accomplish that with sqlite3cpp (
https://github.com/yangacer/sqlite3cpp), a light wrapper of sqlite3 for C++.
Hope it help :-)


// Require sqlite3cpp to be installed from source.
// Compile with: clang++-3.6 -g sqlite_re.cpp -lsqlite3cpp -lsqlite3
-std=c++11
// 
#include 
#include 
#include 
#include 

#include "sqlite3cpp.h"


int main() {
using namespace sqlite3cpp;

database db(":memory:");

// Register the lambda
db.create_scalar("re_replace",
 [](
   std::string pattern,
   std::string value,
   std::string text)
 {
 // Replace regex |pattern| found in |text| with
|value|
 std::stringstream out;
 std::regex re(pattern);


 std::regex_replace(std::ostreambuf_iterator(out),
text.begin(), text.end(),
re, value);
 return out.str();
 });

// Test data
auto csr = db.make_cursor();
csr.executescript(
  "CREATE TABLE T (data TEXT);"
  "INSERT INTO T VALUES('Quick brown fox');"
  );

// Replace vowels with '*'
char const *query = "SELECT re_replace('a|e|i|o|u', '*', data) FROM T";

// Execute the query and print out replaced results
for(auto const &row : csr.execute(query)) {
string_ref result;
std::tie(result) = row.to();
std::cout << result << std::endl;
}

// Should print:
// Q**ck br*wn f*x

return 0;
}


On Wed, May 4, 2016 at 8:25 PM, Bhagwat Balshetwar <
bhagwat.balshetwar at gmail.com> wrote:

> I want to write the custom function for regular expression using C/C++.
> How to write it. Is there the document/sample code available on this.
>
> -Bhagwat
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] sqlite3cpp, Yet Another C++ Wrapper of SQLite

2016-04-20 Thread Acer Yang
Dear SQLite users,

If you are interested in using SQLite database in modern C++ way
sqlite3cpp( https://github.com/yangacer/sqlite3cpp ) hope to be your
favorite choice.

The sqlite3cpp provides following features:

1. Query with range for-loop and typed parameter binding
2. Create SQL scalar function with C++ lambda function
3. Create SQL aggregate with functor

Please check above link for further detail.

Best wishes,
Acer