Created
July 7, 2021 18:38
-
-
Save Akifcan/482a050abfd0e1c1724d37cb2a5b135a to your computer and use it in GitHub Desktop.
where with primary key
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = window.indexedDB.open("photos", 1); | |
request.onsuccess = function (event) { | |
var db = event.target.result; | |
var request = db.transaction(["types"]).objectStore('types').get(1); | |
//get fonksiyonu sorguda kullanılacak değerimizi alıyor. Eğer primary key dışında sorgu yazmak istersek index kullanabiliriz. | |
request.onsuccess = function (event) { | |
console.log(request.result); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment