CData Python Connector for CockroachDB

Build 24.0.8963

Using the Connector

This section provides a walk-through for writing CockroachDB data access code in Python script.

For more information on the available data source entities and how to query them with SQL, see Data Model.

Connecting from Code

For information on how to deploy the connector and configure the connection to CockroachDB, see Package Installation and Establishing a Connection.

For information on how to connect with the cockroachdb.connector module and its related classes, see Connecting.

Executing SQL

The connection's cursor object is used to directly execute SQL queries. For information on how to execute SELECT statements and process the returned result sets, see Querying Data. For information on to modify the data in CockroachDB with INSERT, UPDATE, and DELETE statements, see Modifying Data .

Executing Stored Procedures

You can call stored procedures by using the EXECUTE statement. For further information, see Calling Stored Procedures.

Batch Processing

For information about how to modify several rows of CockroachDB data at once using parameterized INSERT, UPDATE, and DELETE statements, see Batch Processing.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.8963