001/*
002 * To change this license header, choose License Headers in Project Properties.
003 * To change this template file, choose Tools | Templates
004 * and open the template in the editor.
005 */
006package gwt.material.design.jscore.client.api.db;
007
008import gwt.material.design.jscore.client.api.Function;
009import gwt.material.design.jscore.client.api.JsObject;
010import jsinterop.annotations.JsProperty;
011import jsinterop.annotations.JsType;
012
013/**
014 *
015 * @author Cristian Rinaldi
016 * 
017 */
018@JsType(isNative = true)
019public class IDBDatabase extends JsObject{
020
021    @JsProperty
022    public native String getName();
023
024    @JsProperty
025    public native Long getVersion();
026
027    @JsProperty
028    public native String[] getObjectStoreNames();
029
030    @JsProperty
031    public native void setOnabort(Function f);
032
033    @JsProperty
034    public native void setOnerror(Function f);
035
036    @JsProperty
037    public native void setOnversionchange(Function f);
038
039    public native void close();
040
041    public native IDBObjectStore createObjectStore(String objStore, Object parametes);
042
043    public native void deleteObjectStore(String objStore);
044    
045    public native IDBTransaction transaction(String[] objStores, String mode);
046}