Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: squeryl/squeryl
...
head fork: squeryl/squeryl
Checking mergeability… Don't worry, you can still create the pull request.
  • 5 commits
  • 8 files changed
  • 0 commit comments
  • 1 contributor
View
7 .idea/encodings.xml
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" defaultCharsetForPropertiesFiles="UTF-8">
- <file url="file://$PROJECT_DIR$/src/main/scala/org/squeryl/dsl/ManyToMany.scala" charset="UTF-8" />
- </component>
-</project>
-
View
59 .idea/misc.xml
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="DependencyValidationManager">
- <option name="SKIP_IMPORT_STATEMENTS" value="false" />
- </component>
- <component name="EntryPointsManager">
- <entry_points version="2.0" />
- </component>
- <component name="IdProvider" IDEtalkID="B1E3C31DCEBA989C6A50E84DC67DA930" />
- <component name="JavadocGenerationManager">
- <option name="OUTPUT_DIRECTORY" />
- <option name="OPTION_SCOPE" value="protected" />
- <option name="OPTION_HIERARCHY" value="true" />
- <option name="OPTION_NAVIGATOR" value="true" />
- <option name="OPTION_INDEX" value="true" />
- <option name="OPTION_SEPARATE_INDEX" value="true" />
- <option name="OPTION_DOCUMENT_TAG_USE" value="false" />
- <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
- <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
- <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
- <option name="OPTION_DEPRECATED_LIST" value="true" />
- <option name="OTHER_OPTIONS" value="" />
- <option name="HEAP_SIZE" />
- <option name="LOCALE" />
- <option name="OPEN_IN_BROWSER" value="true" />
- </component>
- <component name="NullableNotNullManager">
- <option name="myDefaultNullable" value="org.jetbrains.annotations.Nullable" />
- <option name="myDefaultNotNull" value="org.jetbrains.annotations.NotNull" />
- <option name="myNullables">
- <value>
- <list size="0" />
- </value>
- </option>
- <option name="myNotNulls">
- <value>
- <list size="3">
- <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
- <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
- <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
- </list>
- </value>
- </option>
- </component>
- <component name="ProjectDetails">
- <option name="projectName" value="Squeryl" />
- </component>
- <component name="ProjectResources">
- <default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
- </component>
- <component name="ProjectRootManager" version="2" languageLevel="JDK_1_5" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
- <output url="file://$PROJECT_DIR$/../zaza123" />
- </component>
- <component name="SvnBranchConfigurationManager">
- <option name="mySupportsUserInfoFilter" value="true" />
- </component>
- <component name="WebServicesPlugin" addRequiredLibraries="true" />
-</project>
-
View
10 .idea/modules.xml
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="ProjectModuleManager">
- <modules>
- <module fileurl="file://$PROJECT_DIR$/src/main/Main.iml" filepath="$PROJECT_DIR$/src/main/Main.iml" />
- <module fileurl="file://$PROJECT_DIR$/src/test/Tests.iml" filepath="$PROJECT_DIR$/src/test/Tests.iml" />
- </modules>
- </component>
-</project>
-
View
6 org.squeryl.tests.cfg
@@ -3,9 +3,9 @@ h2.connectionString=jdbc:h2:~/test
h2.user=sa
h2.password=
-postgresql.connectionString=jdbc:postgresql://localhost:5432/test
-postgresql.user=test
-postgresql.password=test
+#postgresql.connectionString=jdbc:postgresql://localhost:5432/test
+#postgresql.user=test
+#postgresql.password=test
#derby.connectionString=jdbc:derby:memory:test;create=true
#derby.user=app
View
8 project/SquerylBuild.scala
@@ -28,10 +28,8 @@ object SquerylBuild extends Build {
},
parallelExecution := false,
publishMavenStyle := true,
- scalaVersion := "2.9.2",
- scalaBinaryVersion <<= scalaVersion { sv => sv },
- crossScalaVersions := Seq("2.10.0-RC5", "2.9.2", "2.9.1", "2.9.0-1", "2.9.0"),
- crossVersion := CrossVersion.full,
+ scalaVersion := "2.10.0",
+ crossScalaVersions := Seq("2.10.0", "2.9.2", "2.9.1", "2.9.0-1", "2.9.0"),
licenses := Seq("Apache 2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
homepage := Some(url("http://squeryl.org")),
pomExtra := (<scm>
@@ -77,7 +75,7 @@ object SquerylBuild extends Build {
Seq("org.scala-lang" % "scalap" % sv,
sv match {
case sv if sv startsWith "2.10" =>
- "org.scalatest" % ("scalatest_" + sv) % "1.8-B1" % "test"
+ "org.scalatest" %% "scalatest" % "1.9.1" % "test"
case sv if sv startsWith "2.9" =>
"org.scalatest" % "scalatest_2.9.2" % "1.6.1" % "test"
case _ =>
View
13 src/main/scala/org/squeryl/internals/ArrayTEF.scala
@@ -5,9 +5,9 @@ import org.squeryl.Session
import org.squeryl.dsl.TypedExpressionFactory
import org.squeryl.dsl.ArrayJdbcMapper
-abstract class ArrayTEF[P, TE] extends TypedExpressionFactory[Array[P], TE] with ArrayJdbcMapper[java.sql.Array, Array[P]] {
- // must define "sample" that includes an element. e.g. Array[Int](0)
- def sample : Array[P]
+abstract class ArrayTEF[P, TE] extends TypedExpressionFactory[Array[P], TE] with ArrayJdbcMapper[java.sql.Array, Array[P]] {
+ // must define "sample" that includes an element. e.g. Array[Int](0)
+ def sample : Array[P]
def toWrappedJDBCType(element: P) : java.lang.Object
def fromWrappedJDBCType(element: Array[java.lang.Object]) : Array[P]
val defaultColumnLength = 1
@@ -17,8 +17,9 @@ abstract class ArrayTEF[P, TE] extends TypedExpressionFactory[Array[P], TE] with
val s = Session.currentSession
val con = s.connection
var rv: java.sql.Array = null
- try {
- val typ = s.databaseAdapter.arrayCreationType(sample(0).getClass)
+ try {
+ //asInstanceOf required for 2.9.0-1 to compile
+ val typ = s.databaseAdapter.arrayCreationType(sample(0).asInstanceOf[{ def getClass : Class[_] }].getClass)
rv = con.createArrayOf(typ, content)
} catch {
case e: Exception => s.log("Cannot create JDBC array: " + e.getMessage)
@@ -29,7 +30,7 @@ abstract class ArrayTEF[P, TE] extends TypedExpressionFactory[Array[P], TE] with
val s = Session.currentSession
var rv : Array[P] = sample.take(0)
try {
- val obj = v.getArray();
+ val obj = v.getArray();
rv = fromWrappedJDBCType(obj.asInstanceOf[Array[java.lang.Object]])
} catch {
case e: Exception => s.log("Cannot obtain array from JDBC: " + e.getMessage)
View
9 src/main/scala/org/squeryl/internals/FieldMetaData.scala
@@ -168,8 +168,9 @@ class FieldMetaData(
* the most appropriate column type
*/
def length: Int =
- if(columnAnnotation == None || columnAnnotation.get.length == -1)
+ if(columnAnnotation == None || columnAnnotation.get.length == -1) {
FieldMetaData.defaultFieldLength(wrappedFieldType, this)
+ }
else
columnAnnotation.get.length
@@ -545,10 +546,12 @@ object FieldMetaData {
def defaultFieldLength(fieldType: Class[_], fmd: FieldMetaData) = {
if(classOf[String].isAssignableFrom(fieldType))
fmd.schema.defaultLengthOfString
- else if(classOf[BigDecimal].isAssignableFrom(fieldType))
+ else if(classOf[java.math.BigDecimal].isAssignableFrom(fieldType) || classOf[scala.math.BigDecimal].isAssignableFrom(fieldType)) {
fmd.schema.defaultSizeOfBigDecimal._1
- else
+ }
+ else {
fmd.schema.fieldMapper.defaultColumnLength(fieldType)
+ }
}
def detectScalapOnClasspath(): Boolean = {
View
93 src/test/Tests.iml
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="FacetManager">
- <facet type="scala" name="Scala">
- <configuration>
- <option name="compilerLibraryLevel" value="Global" />
- <option name="compilerLibraryName" value="Scala2.9.0-1" />
- </configuration>
- </facet>
- </component>
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$/scala" isTestSource="false" />
- </content>
- <orderEntry type="jdk" jdkName="1.6" jdkType="JavaSDK" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="Main" exported="" />
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib_managed/scala_2.9.0-1/provided/scalatest_2.9.0-1.4.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib_managed/scala_2.9.0-1/provided/derby-10.7.1.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib_managed/scala_2.9.0-1/provided/h2-1.2.127.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib_managed/scala_2.9.0-1/provided/jtds-1.2.4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib_managed/scala_2.9.0-1/provided/postgresql-8.4-701.jdbc4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib_managed/scala_2.9.0-1/provided/junit-4.8.2.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib_managed/scala_2.9.0-1/provided/mysql-connector-java-5.1.10.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib/ojdbc14.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- </component>
-</module>
-

No commit comments for this range

Something went wrong with that request. Please try again.