GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - NodeppOfficial/nodepp-sqlite: A Simple SQLITE Connector for Nodepp

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
include/sqlite
include/sqlite
 
 
.gitignore
.gitignore
 
 
CMakeLists.txt
CMakeLists.txt
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
main.cpp
main.cpp
 
 

Repository files navigation

Nodepp SQLite Wrapper

...

Dependencies & Cmake Integration

#libsqlite3-dev
🪟: pacman -S mingw-w64-ucrt-x86_64-sqlite3
🐧: sudo apt install libsqlite3-dev
include(FetchContent)

FetchContent_Declare(
	nodepp
	GIT_REPOSITORY   https://github.com/NodeppOfficial/nodepp
	GIT_TAG          origin/main
	GIT_PROGRESS     ON
)
FetchContent_MakeAvailable(nodepp)

FetchContent_Declare(
	nodepp-sqlite
	GIT_REPOSITORY   https://github.com/NodeppOfficial/nodepp-sqlite
	GIT_TAG          origin/main
	GIT_PROGRESS     ON
)
FetchContent_MakeAvailable(nodepp-sqlite)

#[...]

target_link_libraries( #[...]
	PUBLIC nodepp nodepp-sqlite #[...]
)

Getting Started

#include <nodepp/nodepp.h>
#include <sqlite/sqlite.h>

using namespace nodepp;

void main() {
    // 1. Establish connection (synchronously wait for connection)
    try {
        auto db = sqlite::add("my_database.db");

        // 2. Execute a command synchronously
        if(
            !db.emit("CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT);");
        ){ throw except_t( "something went wrong" ); }

        console::log("Database and table initialized successfully.");

    } catch( except_t error ) {
        console::error("Database initialization failed:", error.what());
    }
}

Compilation

g++ -o main main.cpp -I ./include -lsqlite3 ; ./main

License

Nodepp-SQLite is distributed under the MIT License. See the LICENSE file for more details.

About

A Simple SQLITE Connector for Nodepp

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Ɨ600. No cookies required.