adrianbrowning / prisma-ts-select

A TypeSafe primsa extension allowing more fine grain control of selects
MIT License
2 stars 0 forks source link

Select functions - String #5

Open adrianbrowning opened 4 months ago

adrianbrowning commented 4 months ago
Function In Type Out Type Example
CONCAT() Strings String SELECT CONCAT(first_name, ' ', last_name) FROM users;
SUBSTRING() String, Integer, Integer String SELECT SUBSTRING(name, 1, 3) FROM users;
REPLACE() String , String, String String SELECT REPLACE(description, 'old', 'new') FROM items;
LENGTH() String Integer SELECT LENGTH(username) FROM users;
UPPER() String String SELECT UPPER(city) FROM addresses;
LOWER() String String SELECT LOWER(city) FROM addresses;