Skip to content

Instantly share code, notes, and snippets.

Avatar

Frank David Martínez M mnesarco

  • Colombia
View GitHub Profile
@mnesarco
mnesarco / objects.py
Created Jul 23, 2020
Enhanced python properties with some metaprog.
View objects.py
# file: objects.py
# Copyright 2020 Frank David Martínez Muñoz (mnesarco)
# License: MIT
from typing import Union
__all__ = ('self_properties', 'properties')
def self_properties(self, scope: dict, exclude=(), save_args: bool = False):
@mnesarco
mnesarco / Client
Created Jan 30, 2013
JEE EJB - Mybatis example
View Client
package example.jee6mybatis;
import javax.ejb.EJB;
import javax.ejb.Stateless;
@Stateless
public class Client {
@EJB SessionWrapper mybatis;
@mnesarco
mnesarco / scala-sql-interpolation.scala
Created Jan 12, 2013
Scala 2.10 String interpolation experiment (Sql parameters)
View scala-sql-interpolation.scala
package tests01
object lab {
object PreparedStatement {
case class Param[A](val index : Int, val value : A)
case class BoundSql(val sql: String, val params : Seq[Param[_]])
View SelectWithResultMapSample.scala
/*
* Copyright 2011 The myBatis Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@mnesarco
mnesarco / SelectSample.scala
Created Feb 14, 2012
Mybatis Scala sample
View SelectSample.scala
/*
* Copyright 2011 The myBatis Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
You can’t perform that action at this time.