Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/google/cloud/bigquery/dbapi/__init__.py: 97%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

31 statements  

1# Copyright 2017 Google LLC 

2# 

3# Licensed under the Apache License, Version 2.0 (the "License"); 

4# you may not use this file except in compliance with the License. 

5# You may obtain a copy of the License at 

6# 

7# http://www.apache.org/licenses/LICENSE-2.0 

8# 

9# Unless required by applicable law or agreed to in writing, software 

10# distributed under the License is distributed on an "AS IS" BASIS, 

11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 

12# See the License for the specific language governing permissions and 

13# limitations under the License. 

14 

15"""Google BigQuery implementation of the Database API Specification v2.0. 

16 

17This module implements the `Python Database API Specification v2.0 (DB-API)`_ 

18for Google BigQuery. 

19 

20.. _Python Database API Specification v2.0 (DB-API): 

21 https://www.python.org/dev/peps/pep-0249/ 

22""" 

23 

24from google.cloud.bigquery.dbapi.connection import connect 

25from google.cloud.bigquery.dbapi.connection import Connection 

26from google.cloud.bigquery.dbapi.cursor import Cursor 

27from google.cloud.bigquery.dbapi.exceptions import Warning 

28from google.cloud.bigquery.dbapi.exceptions import Error 

29from google.cloud.bigquery.dbapi.exceptions import InterfaceError 

30from google.cloud.bigquery.dbapi.exceptions import DatabaseError 

31from google.cloud.bigquery.dbapi.exceptions import DataError 

32from google.cloud.bigquery.dbapi.exceptions import OperationalError 

33from google.cloud.bigquery.dbapi.exceptions import IntegrityError 

34from google.cloud.bigquery.dbapi.exceptions import InternalError 

35from google.cloud.bigquery.dbapi.exceptions import ProgrammingError 

36from google.cloud.bigquery.dbapi.exceptions import NotSupportedError 

37from google.cloud.bigquery.dbapi.types import Binary 

38from google.cloud.bigquery.dbapi.types import Date 

39from google.cloud.bigquery.dbapi.types import DateFromTicks 

40from google.cloud.bigquery.dbapi.types import Time 

41from google.cloud.bigquery.dbapi.types import TimeFromTicks 

42from google.cloud.bigquery.dbapi.types import Timestamp 

43from google.cloud.bigquery.dbapi.types import TimestampFromTicks 

44from google.cloud.bigquery.dbapi.types import BINARY 

45from google.cloud.bigquery.dbapi.types import DATETIME 

46from google.cloud.bigquery.dbapi.types import NUMBER 

47from google.cloud.bigquery.dbapi.types import ROWID 

48from google.cloud.bigquery.dbapi.types import STRING 

49 

50 

51apilevel = "2.0" 

52 

53# Threads may share the module and connections, but not cursors. 

54threadsafety = 2 

55 

56paramstyle = "pyformat" 

57 

58__all__ = [ 

59 "apilevel", 

60 "threadsafety", 

61 "paramstyle", 

62 "connect", 

63 "Connection", 

64 "Cursor", 

65 "Warning", 

66 "Error", 

67 "InterfaceError", 

68 "DatabaseError", 

69 "DataError", 

70 "OperationalError", 

71 "IntegrityError", 

72 "InternalError", 

73 "ProgrammingError", 

74 "NotSupportedError", 

75 "Binary", 

76 "Date", 

77 "DateFromTicks", 

78 "Time", 

79 "TimeFromTicks", 

80 "Timestamp", 

81 "TimestampFromTicks", 

82 "BINARY", 

83 "DATETIME", 

84 "NUMBER", 

85 "ROWID", 

86 "STRING", 

87]