Git Product home page Git Product logo

unreal-sqlite3's Introduction

Simple SQLite3 Source integration for Unreal Engine 4

Based on SQLite3UE4 Plugin by Jussi Saarivirta & KhArtNJava but with compiling SQLite3 as part of the module code, this opens up compiling it (hopefully) on all platforms without any extra process.

Please report any problems to the issues tracker on this GitHub, or join us at #unrealengine on irc.freenode.net), you can msg me under Getty.

Difference to SQLite3UE4

SQLite3UE4 integrates sqlite3 as a ThirdParty module, which leads to a chain of complexity and also requires people to build the sqlite3 library before using it. On CISQLite3, we integrated the sqlite3 code directly into the module, and so it gets linked like the rest of the module on compile.

Tested on ...

WARNING The test is so far just compile test (this is all new, updates following regulary)

Windows x64 WORKS, Android WORKS

Installation

Copy this plugin (like Download as ZIP) into the folder Plugins/CISQLite3 on your project and a start of the project should compile the plugin automatically, if the project is C++. If you don't have a C++ project, then you can just make one for the sole purpose of compiling this plugin. Alternative you can install it as Engine Plugin in the Engine Plugins directory (like Epic Games/4.12/Engine/Plugins/Runtime/CISQLite3).

Usage

(More usages to come....)

C++

And here's a simple sample in C++:

Header:

UCLASS()
class SQLITE_API AMyActor : public AActor
{

  GENERATED_BODY()

public:

  UFUNCTION(BlueprintCallable, Category = "My Actor")
  bool GetMyStats();

  UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "My Actor")
  FString Name;

  UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "My Actor")
  int32 Age;

  UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "My Actor")
  FString Gender;

  UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "My Actor")
  float Height;

};

CPP:

#include "MyActor.h"
#include "SQLiteDatabase.h"

bool AMyActor::GetMyStats()
{

  FString dbName = TEXT("TestDatabase");
  FString actorName = TEXT("Bruce Willis");

  if (!USQLiteDatabase::IsDatabaseRegistered(dbName))
  {
    USQLiteDatabase::RegisterDatabase(dbName, "Databases/TestDatabase.db", true);
  }

  bool didPopulate = USQLiteDatabase::GetDataIntoObject(dbName, FString::Printf(TEXT("SELECT Name, Age, Gender, Height FROM Actors WHERE Name = \"%s\""), *actorName), this);

  return didPopulate;

}

License & Copyright

CISQLite3

The MIT License (MIT)

Copyright (c) 2015 Jussi Saarivirta & KhArtNJava (SQLite3UE4)

Copyright (c) 2016 conflict.industries

SQLite3

The author disclaims copyright to this source code. In place of a legal notice, here is a blessing:

May you do good and not evil.

May you find forgiveness for yourself and forgive others.

May you share freely, never taking more than you give.

unreal-sqlite3's People

Contributors

bastiaangrisel avatar getty avatar kushinn avatar

Watchers

 avatar  avatar

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.