Was this page helpful?
ScyllaDB Python Driver is available under the Apache v2 License. ScyllaDB Python Driver is a fork of DataStax Python Driver. See Copyright here.
Caution
You're viewing documentation for an unstable version of Scylla Python Driver. Switch to the latest stable version.
cassandra.cqlengine.management
- Schema management for cqlengine
cassandra.cqlengine.management
- Schema management for cqlengine¶A collection of functions for managing keyspace and table schema.
Creates a keyspace with SimpleStrategy for replica placement
If the keyspace already exists, it will not be modified.
This function should be used with caution, especially in production environments. Take care to execute schema modifications in a single context (i.e. not concurrently with other clients).
There are plans to guard schema-modifying functions with an environment-driven conditional.
name (str) – name of keyspace to create
replication_factor (int) – keyspace replication factor, used with SimpleStrategy
durable_writes (bool) – Write log is bypassed if set to False
connections (list) – List of connection names
Creates a keyspace with NetworkTopologyStrategy for replica placement
If the keyspace already exists, it will not be modified.
This function should be used with caution, especially in production environments. Take care to execute schema modifications in a single context (i.e. not concurrently with other clients).
There are plans to guard schema-modifying functions with an environment-driven conditional.
name (str) – name of keyspace to create
dc_replication_map (dict) – map of dc_names: replication_factor
durable_writes (bool) – Write log is bypassed if set to False
connections (list) – List of connection names
Drops a keyspace, if it exists.
There are plans to guard schema-modifying functions with an environment-driven conditional.
This function should be used with caution, especially in production environments. Take care to execute schema modifications in a single context (i.e. not concurrently with other clients).
name (str) – name of keyspace to drop
connections (list) – List of connection names
Inspects the model and creates / updates the corresponding table and columns.
If keyspaces is specified, the table will be synched for all specified keyspaces. Note that the Model.__keyspace__ is ignored in that case.
If connections is specified, the table will be synched for all specified connections. Note that the Model.__connection__ is ignored in that case. If not specified, it will try to get the connection from the Model.
Any User Defined Types used in the table are implicitly synchronized.
This function can only add fields that are not part of the primary key.
Note that the attributes removed from the model are not deleted on the database. They become effectively ignored by (will not show up on) the model.
This function should be used with caution, especially in production environments. Take care to execute schema modifications in a single context (i.e. not concurrently with other clients).
There are plans to guard schema-modifying functions with an environment-driven conditional.
Inspects the type_model and creates / updates the corresponding type.
Note that the attributes removed from the type_model are not deleted on the database (this operation is not supported). They become effectively ignored by (will not show up on) the type_model.
This function should be used with caution, especially in production environments. Take care to execute schema modifications in a single context (i.e. not concurrently with other clients).
There are plans to guard schema-modifying functions with an environment-driven conditional.
Drops the table indicated by the model, if it exists.
If keyspaces is specified, the table will be dropped for all specified keyspaces. Note that the Model.__keyspace__ is ignored in that case.
If connections is specified, the table will be synched for all specified connections. Note that the Model.__connection__ is ignored in that case. If not specified, it will try to get the connection from the Model.
This function should be used with caution, especially in production environments. Take care to execute schema modifications in a single context (i.e. not concurrently with other clients).
There are plans to guard schema-modifying functions with an environment-driven conditional.
Was this page helpful?
ScyllaDB Python Driver is available under the Apache v2 License. ScyllaDB Python Driver is a fork of DataStax Python Driver. See Copyright here.
cassandra
- Exceptions and Enumscassandra.cluster
- Clusters and Sessionscassandra.policies
- Load balancing and Failure Handling Policiescassandra.auth
- Authenticationcassandra.metadata
- Schema and Ring Topologycassandra.metrics
- Performance Metricscassandra.query
- Prepared Statements, Batch Statements, Tracing, and Row Factoriescassandra.pool
- Hosts and Connection Poolscassandra.protocol
- Protocol Featurescassandra.encoder
- Encoders for non-prepared Statementscassandra.decoder
- Data Return Formatscassandra.concurrent
- Utilities for Concurrent Statement Executioncassandra.connection
- Low Level Connection Infocassandra.util
- Utilitiescassandra.timestamps
- Timestamp Generationcassandra.io.asyncioreactor
- asyncio
Event Loopcassandra.io.asyncorereactor
- asyncore
Event Loopcassandra.io.eventletreactor
- eventlet
-compatible Connectioncassandra.io.libevreactor
- libev
Event Loopcassandra.io.geventreactor
- gevent
-compatible Event Loopcassandra.io.twistedreactor
- Twisted Event Loopcassandra.cqlengine.models
- Table models for object mappingcassandra.cqlengine.columns
- Column types for object mapping modelscassandra.cqlengine.query
- Query and filter model objectscassandra.cqlengine.connection
- Connection management for cqlenginecassandra.cqlengine.management
- Schema management for cqlenginecassandra.cqlengine.usertype
- Model classes for User Defined Types