Class: ActiveShopifyGraphQL::SearchQuery::ParameterBinder
- Inherits:
-
Object
- Object
- ActiveShopifyGraphQL::SearchQuery::ParameterBinder
- Defined in:
- lib/active_shopify_graphql/search_query/parameter_binder.rb
Overview
Binds parameters to string queries with proper sanitization Supports both positional (?) and named (:param) placeholders
Class Method Summary collapse
-
.bind(query_string, *args) ⇒ String
Binds parameters to a query string.
Class Method Details
.bind(query_string, *args) ⇒ String
Binds parameters to a query string
14 15 16 17 18 19 20 21 22 |
# File 'lib/active_shopify_graphql/search_query/parameter_binder.rb', line 14 def self.bind(query_string, *args) return query_string if args.empty? if args.first.is_a?(Hash) bind_named_parameters(query_string, args.first) else bind_positional_parameters(query_string, args) end end |