CData JDBC Driver for Magento 2019 - Online Help
Questions / Feedback?

Customers

CData JDBC Driver for Magento 2019 - Build 19.0.7354

Create, update, delete, and query the available customers in Magento.

Select

The driver will use the Magento API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the driver.

  • EntityId, Websiteid, Gender, and GroupId support the following operators: >, >=, <, <=, =, IN, and NOT IN.
  • CreatedAt and Dob can be used twice to specify a range and support the following operators: >, >=, <, <=, and =.
  • FirstName, LastName, Email, CreatedIn, and MiddleName support the following operators: >, >=, <, <=, =, IN, NOT IN, LIKE, and NOT LIKE.

For example, the following query is processed server side:

SELECT * FROM Customers WHERE Email LIKE '%example.co_' AND EntityId >=30 AND EntityId < 1000 AND GroupId IN (1,2,4) AND CreatedAt < '2013-12-24' AND Gender=2 ORDER BY CreatedAt DESC
You can turn off client-side execution by setting SupportEnhancedSQL to false, in which case any search criteria that refers to other columns will cause an error.

Insert

To add a Customer, specify the FirstName, LastName, Email, Password, WebsiteId, and GroupId fields.

INSERT INTO Customers(FirstName,LastName,Email,Password,WebsiteId,GroupId) VALUES ('John','Doe','john@example.com','123456',1,1)

Update

Magento allows updates for the FirstName, LastName, MiddleName, Suffix, Email, GroupId, Prefix, DisableAutoGroupChange, and Taxvat columns.

UPDATE Customers SET FirstName='Jane',Email='jane@example.com',GroupId=2,DisableAutoGroupChange='True',Prefix='x',Middlename='J',LastName='Doe',Suffix='y',Taxvat=1 WHERE EntityId= 138

Delete

Customers can be deleted by providing the EntityId of the address and issuing a DELETE statement.

DELETE FROM Customers WHERE EntityId=100

Columns

Name Type ReadOnly Description
EntityId [KEY] Integer True

The Id of the customer.

WebsiteId Integer False

The Id of the website associated with the customer.

Email String False

The customer email address.

GroupId Integer False

The Id of the group the customer belongs to.

CreatedAt Datetime False

The creation date.

DisableAutoGroupChange Boolean False

Defines whether the automatic group change for the customer will be disabled.

FirstName String False

The customer first name.

LastName String False

The customer last name.

CreatedIn String False

The website associated with the customer.

Prefix String False

Customer prefix.

MiddleName String False

Customer middle name or initial.

Suffix String False

Customer suffix.

Taxvat String False

Customer Tax or VAT number.

Dob Datetime False

Date of birth.

RewardUpdateNotification Boolean False

Update notification.

RewardWarningNotification Boolean False

Warning notification.

Gender Integer False

The gender of the customer (1-Male,2-Female).

The allowed values are 1, 2.

Password String False

The customer password. The password must contain a minimum of 7 characters.

 
 
Copyright (c) 2020 CData Software, Inc. - All rights reserved.
Build 19.0.7354.0