Giter Site home page Giter Site logo

silentsword2020 / ormlite-core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from j256/ormlite-core

0.0 0.0 0.0 19.14 MB

Core ORMLite functionality that provides a lite Java ORM in conjunction with ormlite-jdbc or ormlite-android

Home Page: http://ormlite.com/

License: ISC License

Makefile 0.03% TeX 12.59% Java 87.37%

ormlite-core's Introduction

ORMLite Core

This package provides the core functionality for the JDBC and Android packages. Users that are connecting to SQL databases via JDBC will need to download the ormlite-jdbc package as well. Android users should download the ormlite-android package as well as this core package.

ORMLite is easy to use and provides the following features:

Enjoy, Gray Watson

Code Example

The following is a quick code example to give you a taste on how to use the library.

// this uses h2 but you can change it to match your database
String databaseUrl = "jdbc:h2:mem:account";
// create a connection source to our database
ConnectionSource connectionSource = new JdbcConnectionSource(databaseUrl);

// instantiate the DAO to handle Account with String id
Dao<Account,String> accountDao = DaoManager.createDao(connectionSource, Account.class);

// if you need to create the 'accounts' table make this call
TableUtils.createTable(connectionSource, Account.class);

// create an instance of Account
String name = "Jim Smith";
Account account = new Account(name, "_secret");

// persist the account object to the database
accountDao.create(account);

// retrieve the account
Account account2 = accountDao.queryForId(name);
// show its password
System.out.println("Account: " + account2.getPassword());

// close the connection source
connectionSource.close();

ChangeLog Release Notes

See the ChangeLog.txt file.

ormlite-core's People

Contributors

bo98 avatar bosborn avatar folkyatina avatar funkthemonk avatar graynk avatar j256 avatar juur avatar miha-x64 avatar noordawod avatar nunoar avatar p91paul avatar svenjacobs avatar tsharp avatar vladad 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.