2024-03-15 23:08:47 +00:00
|
|
|
import std/json
|
2023-11-15 09:26:01 +00:00
|
|
|
|
|
|
|
const
|
|
|
|
ALPHABETIC* = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
|
|
ALPHANUMERIC* = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
2024-03-15 23:08:47 +00:00
|
|
|
ALPHANUMERIC_SPECIAL* =
|
|
|
|
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+-=[]{}|;':\\\",./<>?`~"
|
|
|
|
EMOJI* =
|
|
|
|
"😀 😃 😄 😁 😆 😅 🤣 😂 🙂 🙃 😉 😊 😇 🥰 😍 🤩 😘 😗 😚 😙"
|
2023-11-15 09:26:01 +00:00
|
|
|
CODE* = "def main():\n\tprint('Hello, world!')"
|
2024-03-15 23:08:47 +00:00
|
|
|
QUERY* =
|
|
|
|
"""
|
2023-11-15 09:26:01 +00:00
|
|
|
SELECT
|
|
|
|
u.id,
|
|
|
|
u.name,
|
|
|
|
u.email,
|
|
|
|
u.created_at,
|
|
|
|
u.updated_at,
|
|
|
|
(
|
|
|
|
SELECT
|
|
|
|
COUNT(*)
|
|
|
|
FROM
|
|
|
|
posts p
|
|
|
|
WHERE
|
|
|
|
p.user_id = u.id
|
|
|
|
) AS post_count
|
|
|
|
FROM
|
|
|
|
users u
|
|
|
|
WHERE
|
|
|
|
u.id = 1
|
|
|
|
"""
|
|
|
|
TEXT_SMALL* = "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
2024-03-15 23:08:47 +00:00
|
|
|
TEXT_LARGE* =
|
|
|
|
"""
|
2023-11-15 09:26:01 +00:00
|
|
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras gravida vulputate semper. Proin
|
|
|
|
eleifend varius cursus. Morbi lacinia posuere quam sit amet pretium. Sed non metus fermentum,
|
|
|
|
venenatis nisl id, vestibulum eros. Quisque non lorem sit amet lectus faucibus elementum eu
|
|
|
|
sit amet odio. Mauris tortor justo, malesuada quis volutpat vitae, tristique at nisl. Proin
|
|
|
|
eleifend eu arcu ac sodales. In efficitur ipsum urna, ut viverra turpis sodales ut. Phasellus
|
|
|
|
nec tortor eu urna suscipit euismod eget vel ligula. Phasellus vestibulum sollicitudin tellus,
|
|
|
|
ac sodales tellus tempor id. Curabitur sed congue velit.
|
|
|
|
"""
|
|
|
|
|
|
|
|
proc getSampleJsonDictionary*(): JsonNode =
|
|
|
|
%*{
|
2024-03-15 23:08:47 +00:00
|
|
|
"shapes": [{"type": "circle", "radius": 10}, {"type": "square", "side": 10}],
|
|
|
|
"colours": ["red", "green", "blue"],
|
2023-11-15 09:26:01 +00:00
|
|
|
}
|
|
|
|
|
2024-03-15 23:08:47 +00:00
|
|
|
proc getSampleJsonList*(): JsonNode =
|
|
|
|
%*[{"type": "cat", "name": "Salem"}, {"type": "dog", "name": "Oberon"}]
|
2023-11-15 15:11:36 +00:00
|
|
|
|
2024-01-03 12:11:50 +00:00
|
|
|
proc getByteSequence*(bytesNumber: uint64): seq[byte] =
|
2023-11-15 15:11:36 +00:00
|
|
|
result = newSeq[byte](bytesNumber)
|
|
|
|
for i in 0 ..< bytesNumber:
|
|
|
|
result[i] = cast[byte](i mod 256)
|
|
|
|
return result
|