Giter VIP home page Giter VIP logo

ksdata's Introduction

[KS_GET_DEF_CONFIG_SHARED() initializeDatabase];

DLog(@"%@", [KS_GET_DEF_CONFIG_SHARED() dbPath]);

id dao = KS_GET_DEF_DAO_INSTANCE();

KSUserEntity * ue1 = [KSUserEntity new];

ue1.userID = 900;
ue1.userName = @"小明";
ue1.userAvatar = @"http://image.baidu.com/detail/newindex?col=%E5%8A%A8%E6%BC%AB&tag=%E5%85%A8%E9%83%A8&pn=10&pid=9352809633&aid=&user_id=129439738&setid=-1&sort=1&newsPn=&star=&fr=&from=1";

KSUserEntity * ue3 = [KSUserEntity new];

ue3.userID = 902;
ue3.userName = @"小黑";
ue3.userAvatar = @"http://image.baidu.com/detail/newindex?col=%E5%8A%A8%E6%BC%AB&tag=%E5%85%A8%E9%83%A8&pn=10&pid=9352809633&aid=&user_id=129439738&setid=-1&sort=1&newsPn=&star=&fr=&from=1";

id ue2 = @{ @"userID" : @(901), @"userName" : @"小红", @"userAvatar" : @"nothing" };

KS_DB_INSERT_1(dao, KS_S_KSUSER_INSERT_SINGLE, ue1);
KS_DB_INSERT_1(dao, KS_S_KSUSER_INSERT_SINGLE, ue2);
KS_DB_INSERT_1(dao, KS_S_KSUSER_INSERT_SINGLE, ue3);


NSArray * result = KS_DB_QUERY_LIST_2(dao, KS_S_KSUSER_SELECT_ALL, nil);

DLog(@"%@", result);

KSUserEntity * rsin = KS_DB_QUERY_OBJECT_2(dao, KS_S_KSUSER_SELECT_SINGLE, @(900));

DLog(@"%@", rsin);

KS_DB_CONN_RELEASE(dao);

ksdata's People

Contributors

bing6 avatar

Stargazers

荼蘼花事了 avatar Jack Wong avatar

Watchers

Dawei avatar James Cloos 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.