• Stars
    star
    124
  • Rank 288,207 (Top 6 %)
  • Language
    C++
  • License
    MIT License
  • Created over 9 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Key-Value store for Swift backed by LevelDB

Carthage compatible

SwiftStore

Key/Value store for Swift backed by LevelDB.

Usage

Create instances of store

import SwiftStore

// Create a store.
let store = SwiftStore(storeName: "db")

// Write value
store["username"] = "jondoe"
store["auth-token"] = "cdfsd1231sdf12321"

// Get value
let username = store["username"]!
if !username.isEmpty {
  println(username)
}

let authToken = store["auth-token"]!
if !authToken.isEmpty {
  println(authToken)
}

As Singleton

class DB : SwiftStore {
    /* Shared Instance */
    static let store = DB()

    init() {
        super.init(storeName: "db")
    }

    override func close() {
        super.close()
    }
}

DB.store["username"] = "jondoe"
DB.store["auth-token"] = "1231sdfjl123"

Installation

Carthage

  • Add github "hemantasapkota/SwiftStore" to your cartfile
  • Execute carthage update

Manual Installation

  • Clone this repo: git clone https://github.com/hemantasapkota/SwiftStore/
  • Copy SwiftStore.xcodeproj to your project.
  • Add SwiftStore.framework to the Embedded Binaries secion on the General tab of your main target.

License

The MIT License (MIT)

Copyright (c) 2022 Hemanta Sapkota

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

GCDTimer

Well-tested GCD Timer in Swift
Swift
190
star
2

insta

Instagram power tool
Go
57
star
3

FlatUIColorPaletteXCode

FlatUI Colors palette for XCode
54
star
4

OpenSansSwift

Easily use the OpenSans font in Swift
Swift
41
star
5

j2objc-eclipse-plugin

Eclipse plugin for Google's J2OBJC - A Java to iOS Objective-C translation tool and runtime.
Java
26
star
6

djangobot

curl for django web framework. Make authenticated requests to a django server.
Go
21
star
7

SwiftListView

Instagram style - Collection of simple & neutral list views for Swift
Swift
16
star
8

go-convexhull

Implementation of Graham Scan algorithm for Convex Hull in GO with visualization
Go
16
star
9

awesome-essays

Listen to a curated collection of essays via. text-to-speech
Go
11
star
10

react-native-webserver

An embeddable dynamic web-server for React Native.
Objective-C
10
star
11

goma

Build native mobile apps faster: Write logic in GO. Views in ReactNative.
Go
10
star
12

Embed-Lua-Java-Box2D

Tutorial - How to embed Lua in Java. Example with LibGDX and Box2D
Java
10
star
13

sloot-editor

Box2D Editor with support for entities, animation, screens and scripting.
Java
9
star
14

JSQMessagesViewController

Carthage support for https://github.com/jessesquires/JSQMessagesViewController.
Objective-C
7
star
15

MakeAppIcon

CLI tool to make app icons for IOS and Android
Go
3
star
16

social-media-for-aid-awareness

Generating foreign aid awareness using visualization and social media - A demonstration for Aid Barcamp, KTM 4th August 2011 (GWT, Google Dataset Publishing Language)
Java
3
star
17

TablessNavigationTemplate

Tutorial - Gmail/Facebook like menu navigation structure for IOS.
Objective-C
3
star
18

ogg-preview

Preview OGG files in Atom Editor
CoffeeScript
3
star
19

codeplayground

Support for Go Playground
2
star
20

wikipedia-image-downloader

Give it a list of words and it'll download the images from wikipedia for you.
Go
2
star
21

socketcluster-client

Socket Cluster Client for Golang, IOS, & Android.
JavaScript
2
star
22

ofxPhysicsEditorBox2D

Load fixtures generated by Physics Editor (https://www.codeandweb.com/physicseditor) in OpenFrameworks
Objective-C++
2
star
23

ofAndroidclipse

Eclipse plugin for creating @OpenFrameworks projects for Android
Java
1
star
24

pdfspeaker

Start listening to your pdf files (experimental)
JavaScript
1
star
25

XCodeColorPaletteMaker

XCode color palette (.CLR) file maker
Objective-C
1
star
26

mixpanel-swift

Swift wrapper for MixPanel IOS library with support for Carthage.
Objective-C
1
star
27

myAlgos

Algorithmic Thinking in Golang
Go
1
star
28

LaexianFirstFive

Chrome Extension - Open your favorite websites in Google Chrome with a click.
1
star
29

DockerBeanstalkSample

Hello World in Golang served with Docker. Deployable to AWS Beanstalk.
Go
1
star
30

SampleScrollViewControllerAutoLayout

Sample Scroll View Controller with Auto Layout using SnapKit - https://github.com/SnapKit/SnapKit
Swift
1
star