Class: Google::Apis::SqladminV1::ExecuteSqlPayload

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/sqladmin_v1/classes.rb,
lib/google/apis/sqladmin_v1/representations.rb,
lib/google/apis/sqladmin_v1/representations.rb

Overview

The request payload used to execute SQL statements.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ExecuteSqlPayload

Returns a new instance of ExecuteSqlPayload.



1910
1911
1912
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1910

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#auto_iam_authnBoolean Also known as: auto_iam_authn?

Optional. When set to true, the API caller identity associated with the request is used for database authentication. The API caller must be an IAM user in the database. Corresponds to the JSON property autoIamAuthn

Returns:

  • (Boolean)


1877
1878
1879
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1877

def auto_iam_authn
  @auto_iam_authn
end

#databaseString

Optional. Name of the database on which the statement will be executed. Corresponds to the JSON property database

Returns:

  • (String)


1883
1884
1885
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1883

def database
  @database
end

#partial_result_modeString

Optional. Controls how the API should respond when the SQL execution result is incomplete due to the size limit or another error. The default mode is to throw an error. Corresponds to the JSON property partialResultMode

Returns:

  • (String)


1890
1891
1892
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1890

def partial_result_mode
  @partial_result_mode
end

#row_limitFixnum

Optional. The maximum number of rows returned per SQL statement. Corresponds to the JSON property rowLimit

Returns:

  • (Fixnum)


1895
1896
1897
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1895

def row_limit
  @row_limit
end

#sql_statementString

Required. SQL statements to run on the database. It can be a single statement or a sequence of statements separated by semicolons. Corresponds to the JSON property sqlStatement

Returns:

  • (String)


1901
1902
1903
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1901

def sql_statement
  @sql_statement
end

#userString

Optional. The name of an existing database user to connect to the database. When auto_iam_authn is set to true, this field is ignored and the API caller' s IAM user is used. Corresponds to the JSON property user

Returns:

  • (String)


1908
1909
1910
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1908

def user
  @user
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1915
1916
1917
1918
1919
1920
1921
1922
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1915

def update!(**args)
  @auto_iam_authn = args[:auto_iam_authn] if args.key?(:auto_iam_authn)
  @database = args[:database] if args.key?(:database)
  @partial_result_mode = args[:partial_result_mode] if args.key?(:partial_result_mode)
  @row_limit = args[:row_limit] if args.key?(:row_limit)
  @sql_statement = args[:sql_statement] if args.key?(:sql_statement)
  @user = args[:user] if args.key?(:user)
end