Sets the default keyspace for cqlengine models when passing in an existing session to cqlengine.connection.set_session() if the session's keyspace is set and models.DEFAULT_KEYSPACE isn't. Without this, the user will see an error when trying to perform Cassandra interactions with a Model instance like "Keyspace none does not exist" unless they explicitly set models.DEFAULT_KEYSPACE themselves ahead of time or have a __keyspace__ attribute set on the model. Also no longer raising an exception in cqlengine.connection.setup() if default_keyspace isn't set since individual models might still have __keyspace__ set.
6.9 KiB
6.9 KiB