update data
This commit is contained in:
parent
11871c8014
commit
71794010f5
3 changed files with 26 additions and 12 deletions
|
@ -1,22 +1,19 @@
|
|||
import string
|
||||
from dataclasses import fields
|
||||
|
||||
from surrealdb import Surreal
|
||||
import random
|
||||
|
||||
from lib.database import Database
|
||||
from lib.datatypes import Customer
|
||||
|
||||
|
||||
async def mainold():
|
||||
"""Example of how to use the SurrealDB client."""
|
||||
async with Surreal("ws://localhost:8000/rpc") as db:
|
||||
await db.signin({"user": "root", "pass": "root"})
|
||||
await db.use("test", "test")
|
||||
for k in range(1, 20):
|
||||
await db.create(
|
||||
"Kunde",
|
||||
fill_data().dict(),
|
||||
)
|
||||
db = await Database()
|
||||
for k in range(1, 20):
|
||||
db.create(
|
||||
"Kunde",
|
||||
fill_data().dict(),
|
||||
)
|
||||
|
||||
|
||||
def randomword(length):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue