A sample python application based on FasiAPI and Cassandra database.
Start Cassandra database
# With cassandra it will take a few minutes to checking that it started up correctly
# Wating for it complete started
make start-db
Start application
make start
Run Unit test
make test
https://docs.datastax.com/en/cql-oss/3.x/cql/cql_reference/cqlshShow.html
Working with cassandra database.
Login to cassandra db
cqlsh -u cassandra
Show the version
SHOW VERSION
Get keyspaces info
SELECT * FROM system_schema.keyspaces;
Get tables info
SELECT table_name FROM system_schema.tables WHERE keyspace_name = 'keyspace_organization_db' AND table_name = 'organizations';
Get table info
SELECT * FROM system_schema.columns WHERE keyspace_name = 'keyspace_organization_db' AND table_name = 'organizations';
Select table data
SELECT * FROM keyspace_organization_db.organizations;
Drop table
DROP TABLE keyspace_organization_db.organizations;