<commit_before>YTKKeyValueStore
==========

objc version ：https://github.com/yuantiku/YTKKeyValueStore

![License MIT](https://go-shields.herokuapp.com/license-MIT-blue.png)


## Requirements

- iOS 7.0+ 
- Xcode 6.3


## Usage 

```swift
#import YTKKeyValueStore
```

### YTKKeyValueStore

```swift
var store = YTKKeyValueStore("test.db")   // create or open the key-value store

store.createTable("User")    // create table

let table = store["User"]      // get table (YTKTable)

store.deopTable("User")    // drop table
```

### YTKTable

```swift
let isExists = table.isExists

table.put( "name" <- ("sgxiang" as NSString) )     // put value("sgxiang") for key("name") into table , support string,number,dictionary,array


let objct = table.get("name")    // get object with key , return YTKObject?
let item = table.getItem("name")   // get item with key ,return YTKItem?
let allItems = table.getAllItems()  // get all item with key , return  [YTKItem]?


table.clear()  // clear table
table.delete("name1","name2")   // delete row where key == "name1" and "name2"
table.deletePreLike("name")   // delete row where key pre like "name"
```

### YTKItem

```
itemId       :   itemKey
itemObject   :   itemValue , is json string
createdTime  :   item created time
```
### YTKObject
<commit_msg>Fixed typo.<commit_after>YTKKeyValueStore
==========

objc version ：https://github.com/yuantiku/YTKKeyValueStore

![License MIT](https://go-shields.herokuapp.com/license-MIT-blue.png)


## Requirements

- iOS 7.0+ 
- Xcode 6.3


## Usage 

```swift
#import YTKKeyValueStore
```

### YTKKeyValueStore

```swift
var store = YTKKeyValueStore("test.db")   // create or open the key-value store

store.createTable("User")    // create table

let table = store["User"]      // get table (YTKTable)

store.dropTable("User")    // drop table
```

### YTKTable

```swift
let isExists = table.isExists

table.put( "name" <- ("sgxiang" as NSString) )     // put value("sgxiang") for key("name") into table , support string,number,dictionary,array


let objct = table.get("name")    // get object with key , return YTKObject?
let item = table.getItem("name")   // get item with key ,return YTKItem?
let allItems = table.getAllItems()  // get all item with key , return  [YTKItem]?


table.clear()  // clear table
table.delete("name1","name2")   // delete row where key == "name1" and "name2"
table.deletePreLike("name")   // delete row where key pre like "name"
```

### YTKItem

```
itemId       :   itemKey
itemObject   :   itemValue , is json string
createdTime  :   item created time
```
### YTKObject

{'fraction_non_alphanumeric': 0.15791505791505792, 'fraction_numerical': 0.006177606177606178, 'mean_word_length': 3.6350626118067977, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2692473', 'n_tokens_mistral': 932, 'n_tokens_neox': 857, 'n_words': 233}