Database¶
This CDP domain is experimental.
Types¶
Generally, you do not need to instantiate CDP types yourself. Instead, the API creates objects for you as return values from commands, and then you can use those objects as arguments to other commands.
-
class
cdp.database.
DatabaseId
¶ Unique identifier of Database object.
Commands¶
Each command is a generator function. The return
type Generator[x, y, z]
indicates that the generator
yields arguments of type x
, it must be resumed with
an argument of type y
, and it returns type z
. In
this library, types x
and y
are the same for all
commands, and z
is the return type you should pay attention
to. For more information, see
Getting Started: Commands.
-
cdp.database.
disable
()¶ Disables database tracking, prevents database events from being sent to the client.
Return type: Generator
[Dict
[str
,Any
],Dict
[str
,Any
],None
]
-
cdp.database.
enable
()¶ Enables database tracking, database events will now be delivered to the client.
Return type: Generator
[Dict
[str
,Any
],Dict
[str
,Any
],None
]
-
cdp.database.
execute_sql
(database_id, query)¶ Parameters: - database_id (
DatabaseId
) – - query (
str
) –
Return type: Generator
[Dict
[str
,Any
],Dict
[str
,Any
],Tuple
[Optional
[List
[str
]],Optional
[List
[Any
]],Optional
[Error
]]]Returns: A tuple with the following items:
- columnNames -
- values -
- sqlError -
- database_id (
-
cdp.database.
get_database_table_names
(database_id)¶ Parameters: database_id ( DatabaseId
) –Return type: Generator
[Dict
[str
,Any
],Dict
[str
,Any
],List
[str
]]Returns: