Commit 35a266e2 authored by Nathaniel Wesley Filardo's avatar Nathaniel Wesley Filardo Committed by Nathaniel Wesley Filardo
Browse files

Remove sqlite3 module

It's not clear that this ever worked, AFAICT nobody uses it, and it's an
old version of the sqlite3 engine at this point.  Absent a maintainer,
let's just get rid of it.
parent 8d091c47
...@@ -25,7 +25,7 @@ endif ...@@ -25,7 +25,7 @@ endif
ifndef PDIR # { ifndef PDIR # {
GEN_IMAGES= eagle.app.v6.out GEN_IMAGES= eagle.app.v6.out
GEN_BINS= eagle.app.v6.bin GEN_BINS= eagle.app.v6.bin
OPT_MKTARGETS := coap dht http mqtt pcm sjson sqlite3 tsl2561 websocket OPT_MKTARGETS := coap dht http mqtt pcm sjson tsl2561 websocket
OPT_MKLIBTARGETS := u8g2 ucg OPT_MKLIBTARGETS := u8g2 ucg
SEL_MKTARGETS := $(shell $(CC) -E -dM include/user_modules.h | sed -n '/^\#define LUA_USE_MODULES_/{s/.\{24\}\(.*\)/\L\1/; p}') SEL_MKTARGETS := $(shell $(CC) -E -dM include/user_modules.h | sed -n '/^\#define LUA_USE_MODULES_/{s/.\{24\}\(.*\)/\L\1/; p}')
OPT_SEL_MKLIBTARGETS := $(foreach tgt,$(OPT_MKLIBTARGETS),$(findstring $(tgt), $(SEL_MKTARGETS))) OPT_SEL_MKLIBTARGETS := $(foreach tgt,$(OPT_MKLIBTARGETS),$(findstring $(tgt), $(SEL_MKTARGETS)))
......
...@@ -59,7 +59,6 @@ ...@@ -59,7 +59,6 @@
//#define LUA_USE_MODULES_SOFTUART //#define LUA_USE_MODULES_SOFTUART
//#define LUA_USE_MODULES_SOMFY //#define LUA_USE_MODULES_SOMFY
#define LUA_USE_MODULES_SPI #define LUA_USE_MODULES_SPI
//#define LUA_USE_MODULES_SQLITE3
//#define LUA_USE_MODULES_STRUCT //#define LUA_USE_MODULES_STRUCT
//#define LUA_USE_MODULES_SWITEC //#define LUA_USE_MODULES_SWITEC
//#define LUA_USE_MODULES_TCS34725 //#define LUA_USE_MODULES_TCS34725
......
This diff is collapsed.
#############################################################
# Required variables for each makefile
# Discard this section from all parent makefiles
# Expected variables (with automatic defaults):
# CSRCS (all "C" files in the dir)
# SUBDIRS (all subdirs with a Makefile)
# GEN_LIBS - list of libs to be generated ()
# GEN_IMAGES - list of images to be generated ()
# COMPONENTS_xxx - a list of libs/objs in the form
# subdir/lib to be extracted and rolled up into
# a generated lib/image xxx.a ()
#
ifndef PDIR
GEN_LIBS = libsqlite3.a
endif
STD_CFLAGS= -std=gnu11 -Wimplicit -Wno-undef -include config_ext.h
#############################################################
# Configuration i.e. compile options etc.
# Target specific stuff (defines etc.) goes in here!
# Generally values applying to a tree are captured in the
# makefile at its root level - these are then overridden
# for a subtree within the makefile rooted therein
#
#DEFINES +=
#############################################################
# Recursion Magic - Don't touch this!!
#
# Each subtree potentially has an include directory
# corresponding to the common APIs applicable to modules
# rooted at that subtree. Accordingly, the INCLUDE PATH
# of a module can only contain the include directories up
# its parent path, and not its siblings
#
# Required for each makefile to inherit from the parent
#
INCLUDES += -I .
PDIR := ../$(PDIR)
sinclude $(PDIR)Makefile
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the `fdatasync' function. */
/* #undef HAVE_FDATASYNC */
/* Define to 1 if you have the `gmtime_r' function. */
#define HAVE_GMTIME_R 1
/* Define to 1 if the system has the type `int16_t'. */
#define HAVE_INT16_T 1
/* Define to 1 if the system has the type `int32_t'. */
#define HAVE_INT32_T 1
/* Define to 1 if the system has the type `int64_t'. */
#define HAVE_INT64_T 1
/* Define to 1 if the system has the type `int8_t'. */
#define HAVE_INT8_T 1
/* Define to 1 if the system has the type `intptr_t'. */
/* #undef HAVE_INTPTR_T */
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `isnan' function. */
#define HAVE_ISNAN 1
/* Define to 1 if you have the `localtime_r' function. */
/* #undef HAVE_LOCALTIME_R */
/* Define to 1 if you have the `localtime_s' function. */
/* #undef HAVE_LOCALTIME_S */
/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
/* Define to 1 if you have the `malloc_usable_size' function. */
/* #undef HAVE_MALLOC_USABLE_SIZE */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the pread() function. */
#define HAVE_PREAD 1
/* Define to 1 if you have the pread64() function. */
#define HAVE_PREAD64 1
/* Define to 1 if you have the pwrite() function. */
#define HAVE_PWRITE 1
/* Define to 1 if you have the pwrite64() function. */
#define HAVE_PWRITE64 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the strchrnul() function */
#define HAVE_STRCHRNUL 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if the system has the type `uint16_t'. */
#define HAVE_UINT16_T 1
/* Define to 1 if the system has the type `uint32_t'. */
#define HAVE_UINT32_T 1
/* Define to 1 if the system has the type `uint64_t'. */
#define HAVE_UINT64_T 1
/* Define to 1 if the system has the type `uint8_t'. */
#define HAVE_UINT8_T 1
/* Define to 1 if the system has the type `uintptr_t'. */
/* #undef HAVE_UINTPTR_T */
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the `usleep' function. */
#define HAVE_USLEEP 1
/* Define to 1 if you have the utime() library function. */
#define HAVE_UTIME 1
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME "sqlite"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "sqlite 3.19.3"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "sqlite"
/* Define to the version of this package. */
#define PACKAGE_VERSION "3.19.3"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
#define BUILD_sqlite -DNDEBUG
#define _HAVE_SQLITE_CONFIG_H
#define SQLITE_CORE 1
#define SQLITE_NO_SYNC 1
#define YYSTACKDEPTH 20
#define SQLITE_TEMP_STORE 3
#define SQLITE_SYSTEM_MALLOC 1
#define SQLITE_OS_OTHER 1
#define SQLITE_THREADSAFE 0
#define SQLITE_MUTEX_APPDEF 1
#define SQLITE_SECURE_DELETE 0
#define SQLITE_DISABLE_LFS 1
#define SQLITE_DISABLE_DIRSYNC 1
#define SQLITE_DISABLE_FTS3_UNICODE 1
#define SQLITE_DISABLE_FTS4_DEFERRED 1
#define SQLITE_LIKE_DOESNT_MATCH_BLOBS 1
#define SQLITE_DEFAULT_CACHE_SIZE -1
#define SQLITE_DEFAULT_MEMSTATUS 0
#define SQLITE_DEFAULT_MMAP_SIZE 0
#define SQLITE_DEFAULT_LOCKING_MODE 1
#define SQLITE_DEFAULT_LOOKASIDE 512,125
#define SQLITE_DEFAULT_PAGE_SIZE 4096
#define SQLITE_POWERSAFE_OVERWRITE 1
#define SQLITE_MAX_EXPR_DEPTH 0
#define SQLITE_OMIT_ALTERTABLE 1
#define SQLITE_OMIT_ANALYZE 1
#define SQLITE_OMIT_ATTACH 1
#define SQLITE_OMIT_AUTHORIZATION 1
#define SQLITE_OMIT_AUTOINCREMENT 1
#define SQLITE_OMIT_AUTOMATIC_INDEX 1
#define SQLITE_OMIT_AUTORESET 1
#define SQLITE_OMIT_AUTOVACUUM 1
#define SQLITE_OMIT_BETWEEN_OPTIMIZATION 1
#define SQLITE_OMIT_BLOB_LITERAL 1
#define SQLITE_OMIT_BTREECOUNT 1
#define SQLITE_OMIT_BUILTIN_TEST 1
#define SQLITE_OMIT_CAST 1
#define SQLITE_OMIT_CHECK 1
#define SQLITE_OMIT_COMPILEOPTION_DIAGS 1
#define SQLITE_OMIT_COMPOUND_SELECT 1
#define SQLITE_OMIT_CTE 1
#define SQLITE_OMIT_DECLTYPE 1
#define SQLITE_OMIT_DEPRECATED 1
#define SQLITE_OMIT_EXPLAIN 1
#define SQLITE_OMIT_FLAG_PRAGMAS 1
#define SQLITE_OMIT_FOREIGN_KEY 1
#define SQLITE_OMIT_GET_TABLE 1
#define SQLITE_OMIT_INCRBLOB 1
#define SQLITE_OMIT_INTEGRITY_CHECK 1
#define SQLITE_OMIT_LIKE_OPTIMIZATION 1
#define SQLITE_OMIT_LOAD_EXTENSION 1
#define SQLITE_OMIT_LOCALTIME 1
#define SQLITE_OMIT_LOOKASIDE 1
#define SQLITE_OMIT_MEMORYDB 1
#define SQLITE_OMIT_OR_OPTIMIZATION 1
#define SQLITE_OMIT_PAGER_PRAGMAS 1
#define SQLITE_OMIT_PRAGMA 1
#define SQLITE_OMIT_PROGRESS_CALLBACK 1
#define SQLITE_OMIT_QUICKBALANCE 1
#define SQLITE_OMIT_REINDEX 1
#define SQLITE_OMIT_SCHEMA_PRAGMAS 1
#define SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS 1
#define SQLITE_OMIT_SHARED_CACHE 1
#define SQLITE_OMIT_TCL_VARIABLE 1
#define SQLITE_OMIT_TEMPDB 1
#define SQLITE_OMIT_TRACE 1
#define SQLITE_OMIT_TRIGGER 1
#define SQLITE_OMIT_TRUNCATE_OPTIMIZATION 1
#define SQLITE_OMIT_UTF16 1
#define SQLITE_OMIT_VIEW 1
#define SQLITE_OMIT_VIRTUALTABLE 1
#define SQLITE_OMIT_WAL 1
#define SQLITE_OMIT_XFER_OPT 1
/* #define SQLITE_OMIT_COMPLETE 1 */
/* #define SQLITE_OMIT_SUBQUERY 1 */
/* #define SQLITE_OMIT_DATETIME_FUNCS 1 */
/* #define SQLITE_OMIT_FLOATING_POINT 1 */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# sqlite3 Module
| Since | Origin / Contributor | Maintainer | Source |
| :----- | :-------------------- | :---------- | :------ |
| 2017-06-20 | [Luiz Felipe Silva](https://github.com/luizfeliperj) | [Luiz Felipe Silva](https://github.com/luizfeliperj) | [sqlite3.c](../../app/modules/sqlite3.c)|
!!! attention
###This module is currently not available.
Even if you enable it in configuration it will not be available.
In brief this is due to a lack of proof of usability. The memory constraints on the ESP8266 are just too tight.
The module is not removed yet as it might be revived to run on the ESP32 after the two branches for ESP8266 and ESP32 have been unified.
Please see [#2913](https://github.com/nodemcu/nodemcu-firmware/issues/2913) for more information.
This module is based on [LuaSQLite3](http://lua.sqlite.org/index.cgi/index) module developed by Tiago Dionizio and Doug Currie with contributions from Thomas Lauer, Michael Roth, and Wolfgang Oertl.
This module depens on [SQLite3](http://www.sqlite.org/) library developed by Dwayne Richard Hipp.
For instruction on how to use this module or further documentation, please, refer to [LuaSQLite3 Documentation](http://lua.sqlite.org/index.cgi/doc/tip/doc/lsqlite3.wiki).
This module is a stripped down version of SQLite, with every possible OMIT_\* configuration enable. The enabled OMIT_\* directives are available in the module's [config file](../../app/sqlite3/config_ext.h).
The SQLite3 module vfs layer integration with NodeMCU was developed by me.
**Simple example**
```lua
db = sqlite3.open_memory()
db:exec[[
CREATE TABLE test (id INTEGER PRIMARY KEY, content);
INSERT INTO test VALUES (NULL, 'Hello, World');
INSERT INTO test VALUES (NULL, 'Hello, Lua');
INSERT INTO test VALUES (NULL, 'Hello, Sqlite3')
]]
for row in db:nrows("SELECT * FROM test") do
print(row.id, row.content)
end
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment