scyllapy icon indicating copy to clipboard operation
scyllapy copied to clipboard

Mistake in docs

Open MarchenkoRoman opened this issue 1 year ago • 1 comments
trafficstars

i think its mistake use SELECT in BATCH, scylla dont apply BATCH for SELECT statement, and here is example from docs https://github.com/Intreecom/scyllapy?tab=readme-ov-file#batching also did you have any solution for use COUNT in SELECT statement?

MarchenkoRoman avatar Feb 12 '24 12:02 MarchenkoRoman

You're abolutely correct regarding to README. Thanks!

Also, it's possible to run count without any issues.

import asyncio

from scyllapy import Scylla


async def main():
    scylla = Scylla(["172.18.0.2"])
    await scylla.startup()

    res = await scylla.execute("SELECT COUNT(*) FROM system.local")
    count = res.scalar()
    print(count)


if __name__ == "__main__":
    asyncio.run(main())

s3rius avatar Apr 01 '25 23:04 s3rius