class Marten::DB::Connection::MySQL
- Marten::DB::Connection::MySQL
- Marten::DB::Connection::Base
- Reference
- Object
Defined in:
marten/db/connection/mysql.crInstance Method Summary
- 
        #distinct_clause_for(columns : Array(String)) : String
        
          Returns a distinct clause to remove duplicates from a query's results. 
- 
        #insert(table_name : String, values : Hash(String, ::DB::Any), pk_field_to_fetch : String | Nil = nil) : ::DB::Any
        
          Allows to insert a new row in a specific table. 
- 
        #introspector : Management::Introspector::Base
        
          Returns a Marten::DB::Management::Introspector::Basesubclass instance to use to introspect the DB at hand.
- 
        #left_operand_for(id : String, predicate) : String
        
          Returns the left operand to use for specific query predicate. 
- 
        #limit_value(value : Int | Nil) : Int32 | Int64 | Nil | UInt32 | UInt64
        
          Returns a compatible value to use in the context of a LIMIT statement for the database at hand. 
- 
        #max_name_size : Int32
        
          Returns the maximum size for table names, column names or index / constraint names. 
- 
        #operator_for(predicate) : String
        
          Returns the operator to use for a specific query predicate. 
- 
        #parameter_id_for_ordered_argument(number : Int) : String
        
          Returns the parameterized identifier for an ordered argument. 
- 
        #quote_char : Char
        
          Returns the quote character to use to quote table names, columns, etc. 
- 
        #schema_editor : Management::SchemaEditor::Base
        
          Returns a Marten::DB::Management::SchemaEditor::Basesubclass instance to edit the schema of the DB at hand.
- 
        #scheme : String
        
          Returns the scheme to consider for the underlying database backend. 
- 
        #update(table_name : String, values : Hash(String, ::DB::Any), pk_column_name : String, pk_value : ::DB::Any) : Nil
        
          Allows to update an existing row in a specific table. 
Instance methods inherited from class Marten::DB::Connection::Base
  
  
    
      alias : String
    alias, 
    
  
    
      build_sql(&)
    build_sql, 
    
  
    
      distinct_clause_for(columns : Array(String)) : String
    distinct_clause_for, 
    
  
    
      insert(table_name : String, values : Hash(String, ::DB::Any), pk_field_to_fetch : String | Nil = nil) : ::DB::Any
    insert, 
    
  
    
      introspector : Management::Introspector::Base
    introspector, 
    
  
    
      left_operand_for(id : String, predicate) : String
    left_operand_for, 
    
  
    
      limit_value(value : Int | Nil) : Int32 | Int64 | Nil | UInt32 | UInt64
    limit_value, 
    
  
    
      max_name_size : Int32
    max_name_size, 
    
  
    
      open(&)
    open, 
    
  
    
      operator_for(predicate) : String
    operator_for, 
    
  
    
      parameter_id_for_ordered_argument(number : Int) : String
    parameter_id_for_ordered_argument, 
    
  
    
      quote(name : String | Symbol) : String
    quote, 
    
  
    
      quote_char : Char
    quote_char, 
    
  
    
      sanitize_like_pattern(pattern : String) : String
    sanitize_like_pattern, 
    
  
    
      schema_editor : Management::SchemaEditor::Base
    schema_editor, 
    
  
    
      scheme : String
    scheme, 
    
  
    
      test_database?
    test_database?, 
    
  
    
      transaction(&)
    transaction, 
    
  
    
      update(table_name : String, values : Hash(String, ::DB::Any), pk_column_name : String, pk_value : ::DB::Any) : Nil
    update
    
  
    
  Constructor methods inherited from class Marten::DB::Connection::Base
  
  
    
      new(config : Conf::GlobalSettings::Database)
    new
    
  
    
  
    
    
    
  
    
    
    
  
Instance Method Detail
Returns a distinct clause to remove duplicates from a query's results.
If column names are specified, only these specific columns will be checked to identify duplicates.
Allows to insert a new row in a specific table.
Returns a Marten::DB::Management::Introspector::Base subclass instance to use to introspect the DB at hand.
Each connection implementation should also implement a subclass of
Marten::DB::Management::Introspector::Base.
Returns the left operand to use for specific query predicate.
Most of the time the initial ID will be left intact but depending on the connection implementation and the considered predicate type (eg. "istartswith"), specific SQL functions could be applied on the column ID.
Returns a compatible value to use in the context of a LIMIT statement for the database at hand.
Returns the maximum size for table names, column names or index / constraint names.
Returns the operator to use for a specific query predicate.
Returns the parameterized identifier for an ordered argument.
This method takes the number of the argument which is aimed to be part of an array of ordered SQL arguments.
Returns the quote character to use to quote table names, columns, etc.
Returns a Marten::DB::Management::SchemaEditor::Base subclass instance to edit the schema of the DB at hand.
Each connection implementation should also implement a subclass of
Marten::DB::Management::SchemaEditor::Base.
Returns the scheme to consider for the underlying database backend.
Allows to update an existing row in a specific table.