Create, Alter and Drop Table Cassandra
Table in Cassandra is a collection of ordered (by name) columns fetched by row. A row consists of columns and have a primary key. The first part of the key is a column name. Subsequent parts of a compound key are other column names that define the […]
A keyspace is a container that holds the column families, user defined types. In Cassandra, Keyspace is similar to schema RDBMS Database. Keyspace holds column families, indexes, user defined types, data center awareness, strategy used in keyspace, replication factor, etc.
Syntax CREATE KEYSPACE | SCHEMA IF NOT EXISTS keyspace_name WITH REPLICATION = […]
In this tutorial we learn how to manage user in database cassandra. Setting the cassandra database using username and password authentication. Learn how to login using default username and password cassandra, create user with or without password, create user superuser and nosuperuser, modifying user and dropping user.
Create user
Syntax for create […]
# Spring Boot Using Hikari Connection Pool Connection Pool
In software engineering, a connection pool is a cache of database connections maintained so that the connections can be reused when future requests to the database are required. Connection pools are used to enhance the performance of executing commands on a database. Opening and maintaining […]
spring-boot-call-store-procedure
Dynamic calling store procedure and store function in database
Dynamic calling store procedure and function
1. Via Callable Statement
2. Via SimpleJdbcCall spring-boot-starter-jdbc
See Code Snippets
Store Procedure DELIMITER $$ USE `training_sp`$$ DROP PROCEDURE IF EXISTS `create_product`$$ CREATE DEFINER=`root`@`localhost` PROCEDURE `create_product`(id VARCHAR(255), p_code VARCHAR(255),p_name VARCHAR(255),weight BIGINT) BEGIN INSERT INTO product(id, CODE,NAME,weight) VALUES(id,p_code,p_name,weight); […]
Simple Spring-boot Swagger Documentation
Learning Swagger documentation for rest.
To Add Swagger to your application
add the depedencies
<dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.7.0</version> <scope>compile</scope> </dependency> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId> <version>2.7.0</version> <scope>compile</scope> </dependency>
create SwaggerConfiguration class
@EnableSwagger2 @Configuration public class SwaggerConfig { @Bean public Docket productAPI(){ return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage(“com.putracode”)) .paths(PathSelectors.regex(“/api.*”)) .build() .apiInfo(metaInfo()); […]
Introducing
Changes Is Enemy, But We Must Prepared . –
I have been code with spring boot and thymeleaf, When the *User Interface * add a new search criteria the backend code (my repository, service and controller) must changed too. Honestly I don’t like that. to much changing :(.
I try searching […]
Tesseract is an optical character recognition engine for various operating systems. It is free software, released under the Apache License, Version 2.0, and development has been sponsored by Google since 2006. Tesseract is considered one of the most accurate open source OCR engines currently available Wikipedia
Image processing is widely used in helping to […]
StringUtils is Operations on String that are null safe. Snipset code below was a my code history.
//when i was in collage String result=”putracode”: if(data ==null && data.length>0 ){ result=data; } //First Time in Job String result= (data ==null && data.length>0 ? data ; “putracode”); //And Now String result=StringUtils.defaultIfBlank(data,”putracode”);
Look More Simple.. 😀
StringUtils […]
FastDateFormat is a fast and thread-safe version of SimpleDateFormat.To obtain an instance of FastDateFormat, use one of the static factory methods: getInstance(String, TimeZone, Locale), getDateInstance(int, TimeZone, Locale),getTimeInstance(int, TimeZone, Locale), or getDateTimeInstance(int, int, TimeZone, Locale)
Since FastDateFormat is thread safe, you can use a static member […]