Hands-On Restful Web services with Go by Naren Yellavula
Author:Naren Yellavula [Naren Yellavula]
Language: eng
Format: epub
Tags: COM051010 - COMPUTERS / Programming Languages / General, COM060180 - COMPUTERS / Web / Web Services and APIs, COM060160 - COMPUTERS / Web / Web Programming
Published: 2020-02-28T13:37:04+00:00
It returns the following JSON code:
{
"url":"https://www.packtpub.com/eu/game-development/unreal-engine-4-shaders-and-effects-cookbook"
}
So, the service can use this result to redirect the user to the original URL (site). Here, the generated string doesn't depend on the length of the URL because the database ID is the only criterion for encoding.
The package imports in urlshortener are left out, for brevity. Please refer to the project code from the chapter7 GitHub repository.
The RETURNING keyword needs to be added to the INSERT SQL command in PostgreSQL to fetch the last inserted database ID. This is not the case with the MySQL or SQLite3 INSERT INTO web_url( ) VALUES($1) RETURNING id, record.URL query. This database query returns the last inserted record's ID. If we drop that RETURNING keyword, the query returns nothing.
In the next section, we'll look at an important feature of PostgreSQL called JSONStore. PostgreSQL, unlike other relational databases, can allow JSON to be stored in the form of fields. It also provides a query language for JSON.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7809)
Grails in Action by Glen Smith Peter Ledbrook(7719)
Configuring Windows Server Hybrid Advanced Services Exam Ref AZ-801 by Chris Gill(6828)
Azure Containers Explained by Wesley Haakman & Richard Hooper(6828)
Running Windows Containers on AWS by Marcio Morales(6355)
Kotlin in Action by Dmitry Jemerov(5090)
Microsoft 365 Identity and Services Exam Guide MS-100 by Aaron Guilmette(5064)
Combating Crime on the Dark Web by Nearchos Nearchou(4640)
Microsoft Cybersecurity Architect Exam Ref SC-100 by Dwayne Natwick(4603)
Management Strategies for the Cloud Revolution: How Cloud Computing Is Transforming Business and Why You Can't Afford to Be Left Behind by Charles Babcock(4437)
The Ruby Workshop by Akshat Paul Peter Philips Dániel Szabó and Cheyne Wallace(4330)
The Age of Surveillance Capitalism by Shoshana Zuboff(3979)
Python for Security and Networking - Third Edition by José Manuel Ortega(3890)
The Ultimate Docker Container Book by Schenker Gabriel N.;(3550)
Learn Windows PowerShell in a Month of Lunches by Don Jones(3528)
Learn Wireshark by Lisa Bock(3520)
Mastering Python for Networking and Security by José Manuel Ortega(3376)
Mastering Azure Security by Mustafa Toroman and Tom Janetscheck(3355)
Blockchain Basics by Daniel Drescher(3324)
