Skip to Content
만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술
book

만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술

by 한민주, 양찬석, 탈 아터
April 2019
Beginner to intermediate
368 pages
7h 18m
Korean
Hanbit Media, Inc.
Content preview from 만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술
6 IndexedDB로 로컬에 데이터 저장하기
- 151
트랜잭션 시작하기
앞서 언급한 바와 같이
IndexedDB
에서 수행되는 대부분의 작업은 트랜잭션입니
다. 객체 저장소에 데이터를 추가하기 전에 새 트랜잭션을 시작해야 합니다.
트랜잭션은 데이터베이스 객체에서
transaction
(
)을 호출하여, 첫 번째 인자
로 트랜잭션 범위를 전달하는 것으로 시작됩니다.
transaction
(
)은 트랜잭션이
readonly
트랜잭션
(
기본값)
인지 아니면
readwrite
트랜잭션인지 제어하는 두 번째
인수를 선택적으로 허용하기도 합니다. 이 트랜잭션이 진행되는 동안 객체 저장소에서
데이터를 추가, 삭제, 변경하고자 한다면
readwrite
트랜잭션을 열어야 합니다.
트랜잭션 범위
scope
는 트랜잭션이 영향을 줄 수 있는 객체 저장소 이름 혹은 여러 개의
객체 저장소 이름을 포함한 배열입니다. 트랜잭션 범위를 정의하여,
IndexedDB
가
서로 다른 트랜잭션 사이의 ‘경쟁 상태’
15
를 방지할 수 있습니다
(
예. 동시에 같은 객체 저
장소를 변경하려고 하는 두 개 혹은 그 이상의 트랜잭션)
. 두 개 혹은 그 이상의
readwrite
트랜잭션 범위가 겹치는 경우 각 트랜잭션은 큐에 들어가 순차적으로 실행될 것입니
다. 만일 서로 다른 범위를 갖는
readwrite
트랜잭션이거나 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

파이썬으로 웹 크롤러 만들기: 초간단 나만의 웹 크롤러로 원하는 데이터 가져오는 방법

파이썬으로 웹 크롤러 만들기: 초간단 나만의 웹 크롤러로 원하는 데이터 가져오는 방법

한선용, 라이언 미첼

Publisher Resources

ISBN: 9791162248737