syntax highlighting while rendering SQL using knitr

Issue knitr will execute SQL code using engine=’mysql’ but not highlight syntax: \documentclass{article} \begin{document} <<engine=’mysql’, engine.opts=”-h localhost”>>= SHOW DATABASES; @ \end{document} On the other hand using engine=’highlight’ will highlight the code but not execute it. \documentclass{article} \begin{document} <<engine=’highlight’, engine.opts=’-S sql

Continue reading

Table 'DBNAME.hibernate_sequence' doesn't exist

Issue I have a SpringBoot 2.0.1.RELEASE application using spring data / jpa <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> But when I do an update in the Amazon Aurora DB, I got this error: 2018-04-13 09:20 [pool-1-thread-1] ERROR o.h.id.enhanced.TableStructure.execute(148) – could not read

Continue reading

MySQL Review rating

Issue Opinie : CREATE TABLE `opinie` ( `id_opinie` INT(11) NOT NULL AUTO_INCREMENT, `id_produkt_opinie` INT(11) NULL DEFAULT NULL, `opinia_opinie` VARCHAR(255) NULL DEFAULT NULL, `ocena_opinie` VARCHAR(5) NULL DEFAULT NULL, `aktywny_opinie` ENUM(‘Y’,’N’) NULL DEFAULT ‘N’, PRIMARY KEY (`id_opinie`), UNIQUE INDEX `id_opinie` (`id_opinie`) )

Continue reading

Hibernate mapping exception even though mappings appear correct

Issue I’ve this Java application in package com.luv2code.hibernate.demo: package com.luv2code.hibernate.demo; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; import com.luv2code.hibernate.demo.entity.Employee; public class CreateEmployeeDemo { public static void main(String[] args) { // create session factory SessionFactory factory = new Configuration() .configure("hibernate.cfg.xml") .addAnnotatedClass(Employee.class) .buildSessionFactory();

Continue reading

rails created_at index isn't using index

Issue I have a model called CacheSync, mysql shows that it has an index: mysql> show indexes from cache_syncs; +————-+————+———————————+————–+————-+———–+————-+———-+——–+——+————+———+—————+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null

Continue reading

The mysql join query runned on nodejs gets null results though the given query has no problem

Issue I’m now trying to get some data by executing a ‘JOIN’ query on the server(nodejs), but it keeps giving a nulled result. Below is the query: const selectNameSql=`SELECT data_db.assets.name_assets, data_db.assets.id_assets, data_db.threats.name_threats, data_db.threats.id_threats, data_db.vulns.name_vulns, data_db.vulns.id_vulns FROM data_db.threats RIGHT JOIN data_db.assets

Continue reading