본문 바로가기

전체 글

(228)
go template html페이지에 for문 등 돌리기. https://github.com/gin-gonic/gin#html-rendering https://github.com/gin-gonic/gin/issues/600 https://play.golang.org/p/4_IPwD3Y84D https://golang.org/pkg/text/template/ gin-gonic에서 제공하는게 아나라 go에 있는 template 엔진이구나. https://astaxie.gitbooks.io/build-web-application-with-golang/en/07.4.html 처음엔 gin-gonic 웹프레임워크에 있는 템플릿 엔진인지 알았는데 go에 있는 template 엔진이었다. go 페이지 map_url = make(map[string]string) map_url..
gin-gonic 라우터 for 문돌리기 전에 실패했는데 이번에 성공 일단 html을 바인딩하는데 반복적인 func 이 들어가서 이걸 해소 하려고 했다. [이전코드] package main import ( "fmt" "net/http" "github.com/gin-gonic/gin" "github.com/gofrs/uuid" ) func get_index(c *gin.Context) { c.Header("Content-Type", "text/html") //views폴더가 자동으로 지정되는 듯하다. view로 폴더이름 했을땐 에러났다. c.HTML(http.StatusOK, "index.html", gin.H{}) } func get_simple(c *gin.Context) { c.Header("Content-Type", "text/html") //views폴더가 자동으로..
javascript Accordion menu 모음집 https://onokumus.com/metismenujs/mm-vertical.html\ MetisMenuJS - Vertical Menu onokumus.com 일단위에꺼 쓰자. https://github.com/aaronsaray/jquery-accordion-live-filter aaronsaray/jquery-accordion-live-filter jQuery plugin to live filter an accordion list. Contribute to aaronsaray/jquery-accordion-live-filter development by creating an account on GitHub. github.com 이건 fliter가 달린거다.
테이블 select 자동 postgresql select 'select ' union all select 'a.' || a.column_name ||',' from information_schema.columns a left outer join pg_catalog.pg_description b on b.objsubid = a.ordinal_position inner join pg_class c on b.objoid=c.oid and c.relname =a.table_name where 1=1 and a.table_schema='public' and a.table_name='tb_optkwfid' union all select ' from tb_optkwfid a '
slickgrid data 넣을때 쿼리문으로 !! 정렬해서.!! 문자열 만들어서 select '{ name : "'|| b.description ||'", id: "'|| a.column_name || '", field: "'|| a.column_name || '", cssClass: "tal", sortable: true, formatter: Slick.Formatters.MoneyFormatter},' from information_schema.columns a left outer join pg_catalog.pg_description b on b.objsubid = a.ordinal_position inner join pg_class c on b.objoid=c.oid and c.relname =a.table_name where 1=1 and a.table_schema='pub..
postgresql 도멘인 넣기. 컬럼 사이즈등등 insert into tb_cm_domain ( domain_nm, domain_cd, data_type, rmk, crt_dtm ) select domain_nm, domain_cd, data_type, ARRAY_TO_STRING(ARRAY_AGG(table_name ORDER BY table_name),',') rmk, now() from ( select b.description domain_nm ,a.column_name domain_cd ,a.data_type || case when character_maximum_length is not null then '('||character_maximum_length||')' else '' end as data_type ,a.table_name --,a..
postgresql ==> ARRAY_TO_STRING(ARRAY_AGG(컬러명 ORDER BY 컬럼명), ',') 컴마 연결 오라클 LIST_AGG 같은거. insert into tb_cm_domain ( domain_nm, domain_cd, data_type, rmk, crt_dtm ) select domain_nm, domain_cd, data_type, ARRAY_TO_STRING(ARRAY_AGG(table_name ORDER BY table_name),',') rmk, now() from ( select b.description domain_nm ,a.column_name domain_cd ,a.data_type || case when character_maximum_length is not null then '('||character_maximum_length||')' else '' end as data_type ,a.table_name --,a..
오라클 XMLAGG ,LIST AGG GROUP BY 로 묶고 여러 컬럼들을 , 단위로 연결해서 나타내고 싶을때 사용.