Extension. Get all TinyDB. Save TinyDB content to CloudDB

extension_tinydb6

You can download the extension from:
http://kio4.com/appinventor/256_extension_tinydb_obtener.htm

1.- Get the content of a TinyDB in JSON and CSV format.

p256_Get_TinyDB.aia (10.8 KB)

Notice that each TinyDB has a different Namespace:
extension_tinydb3

2 Likes

2.- Copy the content of a csv file into a TinyDB.

p256_Get_TinyDB_v2.aia (11.3 KB)

  • We have this file in the asset: africa.csv
Egipto,"El Cairo"
Argelia,"Argel"
Libia,"Trípoli"
  • We want to load that content into TinyDB1 with Namespace: Tiny_ONE

  • Using the File component we copy the africa.csv file into ASD, then we load its content into TinyDB1

3.- Save a TinyDB in CloudDB. Get her back.

p256_Get_TinyDB_v3.aia (11.4 KB)

  • We create a TinyDB and show its content using Button2.

  • Through the Csv block we obtain the entire TinyDB and save all its content in CloudDB with the backup label.

  • We delete the entire TinyDB using the ClearAll block.

  • We press Button2 again to show its content and we observe that it is deleted.

  • Press Button5 to obtain the content of the TinyDB stored in CloudDB and save it in the file: backup.txt

  • We load the backup.txt file in the TinyDB with Namespace: Tiny_ONE

4.- Upload and download file to FireBase.

Instead of saving the information in CloudDB, we can upload the backup.txt file to Firebase, for that we follow the tutorials of @TIMAI2

This format:

Egipto,"El Cairo"
Argelia,"Argel"
Libia,"Trípoli"

Stress test

p256_Get_TinyDB_v2C.aia (12.0 KB)

Egipto,"El Cairo"
Argelia,"Argel"
Libia,"Tripoli"
Spanish,"Hola: el Ñandú corrió por Cádiz (España), y no alcanzó a la cigüeña."
Link,"https://ai2.metricrat.co.uk/guides/firebase-with-a-web-component/firebase-demo-no-security-with-web-component"
Chinese,"人是唯一被同一块石头绊倒两次的动物。"
Arab,"الإنسان هو الحيوان الوحيد الذي يتعثر مرتين بنفس الحجر."
Finés,"Ihminen on ainoa eläin, joka kompastui kahdesti samaan kiveen."
Tailandés,"มนุษย์เป็นสัตว์ชนิดเดียวที่สะดุดหินก้อนเดียวกันถึงสองครั้ง"
Varios Caractéres,"Saludos: Hola_Adiós, 'Amigo', 3000$, 20%, Vinos: Williams & Humbert, 12/2=6, ¿Sí o no?"

5.- Get all TinyDB using KIO4_Terminal.aix extension.

DEco_XML.aia (16.3 KB)

extension_tinydb14

https://community.appinventor.mit.edu/t/using-linux-commands-in-app-inventor-extension/6469

1 Like

Does not work with lists!



It does.
You do not show your blocks for using the extension, or the outputs you are getting?


blocks (4)

This

image

should be create empty list

Also