Class: Google::Apis::DatastoreV1::GqlQuery
- Inherits:
 - 
      Object
      
        
- Object
 - Google::Apis::DatastoreV1::GqlQuery
 
 
- Includes:
 - Core::Hashable, Core::JsonObjectSupport
 
- Defined in:
 - generated/google/apis/datastore_v1/classes.rb,
generated/google/apis/datastore_v1/representations.rb,
generated/google/apis/datastore_v1/representations.rb 
Overview
A GQL query.
Instance Attribute Summary collapse
- 
  
    
      #allow_literals  ⇒ Boolean 
    
    
      (also: #allow_literals?)
    
  
  
  
  
    
    
  
  
  
  
  
  
    
When false, the query string must not contain any literals and instead must bind all values.
 - 
  
    
      #named_bindings  ⇒ Hash<String,Google::Apis::DatastoreV1::GqlQueryParameter> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
For each non-reserved named binding site in the query string, there must be a named parameter with that name, but not necessarily the inverse.
 - 
  
    
      #positional_bindings  ⇒ Array<Google::Apis::DatastoreV1::GqlQueryParameter> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0.
 - 
  
    
      #query_string  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
A string of the format described here.
 
Instance Method Summary collapse
- 
  
    
      #initialize(**args)  ⇒ GqlQuery 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of GqlQuery.
 - 
  
    
      #update!(**args)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Update properties of this object.
 
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ GqlQuery
Returns a new instance of GqlQuery
      1271 1272 1273  | 
    
      # File 'generated/google/apis/datastore_v1/classes.rb', line 1271 def initialize(**args) update!(**args) end  | 
  
Instance Attribute Details
#allow_literals ⇒ Boolean Also known as: allow_literals?
When false, the query string must not contain any literals and instead must
bind all values. For example,
SELECT * FROM Kind WHERE a = 'string literal' is not allowed, while
SELECT * FROM Kind WHERE a = @value is.
Corresponds to the JSON property allowLiterals
      1246 1247 1248  | 
    
      # File 'generated/google/apis/datastore_v1/classes.rb', line 1246 def allow_literals @allow_literals end  | 
  
#named_bindings ⇒ Hash<String,Google::Apis::DatastoreV1::GqlQueryParameter>
For each non-reserved named binding site in the query string, there must be
a named parameter with that name, but not necessarily the inverse.
Key must match regex A-Za-z_$*, must not match regex
__.*__, and must not be "".
Corresponds to the JSON property namedBindings
      1255 1256 1257  | 
    
      # File 'generated/google/apis/datastore_v1/classes.rb', line 1255 def named_bindings @named_bindings end  | 
  
#positional_bindings ⇒ Array<Google::Apis::DatastoreV1::GqlQueryParameter>
Numbered binding site @1 references the first numbered parameter,
effectively using 1-based indexing, rather than the usual 0.
For each binding site numbered i in query_string, there must be an i-th
numbered parameter. The inverse must also be true.
Corresponds to the JSON property positionalBindings
      1263 1264 1265  | 
    
      # File 'generated/google/apis/datastore_v1/classes.rb', line 1263 def positional_bindings @positional_bindings end  | 
  
#query_string ⇒ String
A string of the format described
here.
Corresponds to the JSON property queryString
      1269 1270 1271  | 
    
      # File 'generated/google/apis/datastore_v1/classes.rb', line 1269 def query_string @query_string end  | 
  
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
      1276 1277 1278 1279 1280 1281  | 
    
      # File 'generated/google/apis/datastore_v1/classes.rb', line 1276 def update!(**args) @allow_literals = args[:allow_literals] if args.key?(:allow_literals) @named_bindings = args[:named_bindings] if args.key?(:named_bindings) @positional_bindings = args[:positional_bindings] if args.key?(:positional_bindings) @query_string = args[:query_string] if args.key?(:query_string) end  |