JDBC Driver for Shopify

Build 22.0.8479

Metafields

Retrieves a list of metafields that belong to a resource.

View-Specific Information

Select

The 本製品 uses the Shopify API to process search criteria that refer to the Id, OwnerId and OwnerResource columns. The supported SQL operators are '=,IN' for the Id, OwnerResource and OwnerId columns. The 本製品 processes other filters client-side within the 本製品. You can turn off the client-side execution of the query by setting SupportEnhancedSQL to false in which case any search criteria will be ignored and an unfiltered response will be returned.

For example, the following queries are processed server side:

SELECT * FROM Metafields WHERE Id = 721389482

SELECT * FROM Metafields WHERE ID IN (SELECT Id FROM Customers)

SELECT * FROM Metafields WHERE ID IN (19422939054103,19422939185175,19422939250711,19431415152663,19431415185431)

SELECT * FROM Metafields WHERE OwnerId = 64146833431 AND OwnerResource = 'product'

SELECT * FROM Metafields WHERE OwnerId = 64146833431 AND OwnerResource IN ('product', 'customer')

SELECT * FROM Metafields WHERE OwnerId IN (64146833430, 64146833431) AND OwnerResource = 'product'

SELECT * FROM Metafields WHERE OwnerResource = 'customer' AND OwnerId IN (SELECT Id FROM Customers);

Insert

You must specify the NameSpace, Key, and Value to create Metafields.

INSERT INTO Metafields (NameSpace,Key,Value,Type,Description,OwnerResource) VALUES ('inventory','warehouse',25,'number_integer','This is description about data','factory')

Update

You must specify the Id to update Metafields. For example:

UPDATE Metafields SET Value = 26 WHERE Id = 19766614851607

Delete

You must specify the Id of the Metafields to delete it.

DELETE FROM Metafields WHERE Id = 19766614851607

Columns

Name Type ReadOnly References Description
Id [KEY] Long True

The unique ID of the metafield.

Namespace String False

A container for a set of metafields. You need to define a custom namespace for your metafields to distinguish them from the metafields used by other apps.

Key String False

The name of the metafield.

Value String False

The information to be stored as metadata.

Type String False

The metafield's information type.

Description String False

A description of the information that the metafield contains.

OwnerId Long False

The unique ID of the resource that the metafield is attached to.

OwnerResource String False

The type of resource that the metafield is attached to.

使用できる値は次のとおりです。shop, draft_order, product, variant, page, article, order, customer, collection, blog, product_image

CreatedAt Datetime True

The date and time (ISO 8601 format) when the metafield was created.

UpdatedAt Datetime True

The date and time (ISO 8601 format) when the metafield was last updated.

AdminGraphqlApiId String True

The admin graphql api id

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8479