DocumentationHelp Center
Close Apache Cassandra database connection
close(conn)
example
close(conn) closes the Cassandra® database connection.
conn
collapse all
This example uses:
Using a Cassandra® database connection, display the keyspaces and then close the connection.
Create a Cassandra database connection using the local host address. conn is a cassandra object.
cassandra
contactPoints = "localhost"; conn = cassandra(contactPoints);
Verify that the Cassandra database connection is open.
val = isopen(conn)
val = logical 1
The database connection is open because the isopen function returns 1. Otherwise, the database connection is closed.
isopen
1
Display the keyspaces in the Cassandra database.
conn.Keyspaces
ans = 1×6 string array "employeedata" "system" "system_auth" "system_distributed" "system_schema" "system_traces"
Close the Cassandra database connection.
Cassandra database connection, specified as a cassandra object.
cassandra | columninfo | executecql | isopen | partitionRead | tablenames
columninfo
executecql
partitionRead
tablenames
A modified version of this example exists on your system. Do you want to open this version instead?
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office