Sha256: 94490c0fe4abd3df825745b1c9ecb49b15d35e83ba879724b8b6775a88d90109

Contents?: true

Size: 375 Bytes

Versions: 14

Compression:

Stored size: 375 Bytes

Contents

module SchemaPlus::DefaultExpr
  module ActiveRecord
    module ConnectionAdapters
      module PostgresqlAdapter
        def default_expr_valid?(expr)
          true # arbitrary sql is okay in PostgreSQL
        end

        def sql_for_function(function)
          case function
          when :now
            "NOW()"
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
schema_plus_default_expr-1.0.1 lib/schema_plus/default_expr/active_record/connection_adapters/postgresql_adapter.rb
schema_plus_default_expr-1.0.0 lib/schema_plus/default_expr/active_record/connection_adapters/postgresql_adapter.rb
schema_plus_default_expr-0.1.5 lib/schema_plus/default_expr/active_record/connection_adapters/postgresql_adapter.rb
schema_plus_default_expr-0.1.4 lib/schema_plus/default_expr/active_record/connection_adapters/postgresql_adapter.rb
schema_plus_default_expr-0.1.3 lib/schema_plus/default_expr/active_record/connection_adapters/postgresql_adapter.rb
schema_plus_default_expr-0.1.2 lib/schema_plus/default_expr/active_record/connection_adapters/postgresql_adapter.rb
schema_plus_default_expr-0.1.1 lib/schema_plus/default_expr/active_record/connection_adapters/postgresql_adapter.rb
schema_plus_default_expr-0.1.0 lib/schema_plus/default_expr/active_record/connection_adapters/postgresql_adapter.rb
schema_plus-2.0.0.pre11 lib/schema_plus/default_expr/active_record/connection_adapters/postgresql_adapter.rb
schema_plus-2.0.0.pre10 lib/schema_plus/default_expr/active_record/connection_adapters/postgresql_adapter.rb
schema_plus-2.0.0.pre9 lib/schema_plus/default_expr/active_record/connection_adapters/postgresql_adapter.rb
schema_plus-2.0.0.pre8 lib/schema_plus/default_expr/active_record/connection_adapters/postgresql_adapter.rb
schema_plus-2.0.0.pre7 lib/schema_plus/default_expr/active_record/connection_adapters/postgresql_adapter.rb
schema_plus-2.0.0.pre6 lib/schema_plus/default_expr/active_record/connection_adapters/postgresql_adapter.rb