목록2018/01/04 (2)
오늘도 공부
요 며칠 Firestore 관련해서 삽질을 많이 했다. 느낀 점을 정리해본다. 1. 읽고 , 쓰기 속도는 좀 걸린다. - 최소 1~2초정도 걸린다. 이점을 고려해서 설계를 해야 할것 이다. 2. 모델링시 방법이 많은데 대략 3가지를 소개하고 있다. https://firebase.google.com/docs/firestore/manage-data/structure-data?hl=ko문서의 중첩 데이터문서 내에 배열(맵) 등의 복합 개체를 중첩할 수 있습니다.장점: 문서 안에 단순한 고정 데이터 목록을 보관하려는 경우 데이터 구조를 손쉽게 설정하고 간소화할 수 있습니다.한계: 중첩 목록에 대해 쿼리를 실행할 수 없습니다. 또한 시간에 따라 데이터가 증가하는 경우 다른 옵션보다 확장성이 부족합니다. 목록이 커..
You have two choices:The first and most performant is to use associateBy function that takes two lambdas for generating the key and value, and inlines the creation of the map:val map = friends.associateBy({it.facebookId}, {it.points})The second, less performant, is to use the standard map function to create a list of Pair which can be used by toMap to generate the final map:val map = friends.map..
