Created
April 10, 2022 09:25
-
-
Save ShanikaNishadhi/4507232e50f35e8d72511e07891bc17a to your computer and use it in GitHub Desktop.
This file contains 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
# Insert Data into the Collection using a Map | |
query_result = client.query( | |
faunaquery.map_( | |
lambda username: faunaquery.create( | |
faunaquery.collection("testCollection"), | |
{"data": {"name": username}} | |
), | |
[ | |
"Barry", | |
"Sam", | |
"Ashley", | |
"Kat", | |
"Nathan" | |
] | |
) | |
) | |
# Print the Result of the Query | |
print(query_result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment